<?php
/**
 * Created by PhpStorm.
 * User: guokunsheng
 * Date: 2019/1/18
 * Time: 16:22
 */

namespace app\common\lib\astrolog;


use think\Log;

class Synastry
{
    /**
     * 参数配置
     * @var array
     */
    public $option = [
        'recode1' => [],
        'recode2' => [],
        'data1' => [],
        'data2' => [],
    ];
    /**
     * 内置其他参数配置
     * @var array
     * base 每颗星设定合盘计分比重值如下太阳80，月亮110，水星50，金星60，火星50，上升80，中天70；共500
     */
    protected $param = [
        'base' => [0 => 80, 1 => 110, 2 => 50, 3 => 60, 4 => 50, ASC => 80, MC => 70],
    ];
    /**
     * 当前生成的数据
     * @var array
     */
    public $data = [
        'coef1' => [],
        'coef2' => [],
        'score' => [
            'attract' => 0,
            'chat' => 0,
            'passion' => 0,
            'benefit' => 0,
            'happy' => 0,
            'probTobeLover' => 0,
        ],
        'harmoniousConflict' => [0, 0],
    ];
    /**
     * 错误信息 msg
     * @var string
     */
    protected $error = '';
    /**
     * 2024合盘改版分数倍率
     *  (为了保证最终结果和词条数据结果一致)
     * @var int
     */
    public $multiple = 2.1;


    /**
     * 构造函数
     * AuthenticateLove constructor.
     * @param array $option 自定义配置
     */
    public function __construct($option = [])
    {
        // 实例化时初始化参数
        if (!empty($option))
        {
            $this->option = array_merge($this->option, $option);
        }
    }

    public function init()
    {
        if (empty($this->option['data1']) || empty($this->option['data2']) || empty($this->option['recode1']) || empty($this->option['recode2']))
        {
            $this->error = '基础参数错误：synastry';
            return false;
        }

        $this->data['coef1'] = $this->getThePrimingScore($this->option['data1']);
        $this->data['coef2'] = $this->getThePrimingScore($this->option['data2']);
        $this->getTheHarmoniousAndConflict();

        $attract = $this->getTheAttractScore();// 吸引指数
        $chat = $this->getTheChatScore();// 沟通指数
        $passion = $this->getThePassionScore();// 激情指数
        $benefit = $this->getTheintimateScore();// 亲密指数
        $happy = $this->getTheHappyScore();// 愉悦指数
        $probTobeLover = $this->getTheProbTobeLover();// 缘分指数
        $attract = ($attract / 200 * 100);
        $chat = ($chat / 120 * 100);
        $passion = ($passion / 180 * 100);
        $benefit = ($benefit / 120 * 100);
        $happy = ($happy / 130 * 100);
        $probTobeLover = ($probTobeLover / 180 * 100);
        $this->data['score']['attract'] = $attract > 100 ? 100 : ($attract < 1 ? 1 : round($attract));
        $this->data['score']['chat'] = $chat > 100 ? 100 : ($chat < 1 ? 1 : round($chat));
        $this->data['score']['passion'] = $passion > 100 ? 100 : ($passion < 1 ? 1 : round($passion));
        $this->data['score']['benefit'] = $benefit > 100 ? 100 : ($benefit < 1 ? 1 : round($benefit));
        $this->data['score']['happy'] = $happy > 100 ? 100 : ($happy < 1 ? 1 : round($happy));
        $this->data['score']['probTobeLover'] = $probTobeLover > 100 ? 100 : ($probTobeLover < 1 ? 1 : round($probTobeLover));

        return [];
    }

    /**
     * 获取个人星正反引动指数 日月水金火木土天海冥
     * 木土天海冥北交相位对象只计算日月水金火四轴
     * 有相位系数(使用中)
     * @param array $data
     * @return array
     */
    protected function getThePrimingScore($data = [])
    {
        $ret = ['obverse' => [], 'versa' => []];
        $imp_o = [0 => 14, 1 => 15, 2 => 8, 3 => 10, 4 => 9, 5 => 7.5, 6 => 3, 7 => 5, 8 => 5, 9 => 4, 12 => 4, ASC => 14, MC => 13];// 重要指数=》正
        $imp_v = [0 => 14, 1 => 15, 2 => 8, 3 => 10, 4 => 9, 5 => 7.5, 6 => 15, 7 => 5, 8 => 5, 9 => 4, 12 => 4, ASC => 14, MC => 13];// 重要指数=》反
        $b = $data[1];// b用户
        $planets = $b['planets'];
        foreach ($planets as $i => $p)
        {
            if ($i > 12 && $i != ASC && $i != MC) continue;
            $ret['obverse'][$i] = $ret['versa'][$i] = 0;

            if (empty($p['phase'])) continue;// 空相时结束本轮循环

            foreach ($p['phase'] as $phase)
            {
                $k = $phase['id'];
                $phase_e = $phase['phase_e'];
                $phase_orb = $phase['phase_orb'];
                $coef_o = 0;// 正面系数
                $coef_v = 0;// 反面系数
//                $phase_o = 0;// 相位系数
                if ($phase_orb < 0.5) $phase_o = 1;
                elseif ($phase_orb < 1.5) $phase_o = 0.9;
                elseif ($phase_orb < 3) $phase_o = 0.85;
                elseif ($phase_orb <= 5) $phase_o = 0.8;
                else $phase_o = 0.75;

                if (in_array($k, [0, 1, 2, 3, 5]))
                {
                    if ($phase_e == 0) $coef_o = 1;
                    elseif ($phase_e == 60) $coef_o = 0.7;
                    elseif ($phase_e == 120) $coef_o = 0.85;
                    elseif ($phase_e == 90)
                    {
                        $coef_o = 0.2;
                        $coef_v = 0.8;
                    } elseif ($phase_e == 180)
                    {
                        $coef_o = 0.7;
                        $coef_v = 0.5;
                    }
                    $ret['obverse'][$i] += $imp_o[$k] * $coef_o * $phase_o;
                    $ret['versa'][$i] += $imp_v[$k] * $coef_v * $phase_o;
                } elseif ($k == 4 || $k == 6)
                {
                    if ($phase_e == 0)
                    {
                        $coef_o = 1;
                        $coef_v = 0.5;
                        if ($k == 4)
                        {
                            $coef_o = 0.5;
                            $coef_v = 0.8;
                        }
                    } elseif ($phase_e == 60)
                    {
                        $coef_o = 0.7;
                        $coef_v = 0.2;
                    } elseif ($phase_e == 90)
                    {
                        $coef_o = 0.2;
                        $coef_v = 0.9;
                    } elseif ($phase_e == 120)
                    {
                        $coef_o = 0.8;
                        $coef_v = 0.2;
                    } elseif ($phase_e == 180)
                    {
                        $coef_o = 0.7;
                        $coef_v = 0.7;
                    }
                    $ret['obverse'][$i] += $imp_o[$k] * $coef_o * $phase_o;
                    if ($k == 6) $ret['versa'][$i] += $imp_v[$k] * $coef_v * $phase_o;
                    else $ret['versa'][$i] += $imp_v[$k] * $coef_v * $phase_o;
                } elseif (in_array($i, [0, 1, 2, 3, 4, ASC, MC]) && in_array($k, [7, 8, 9]))
                {
                    if ($phase_e == 0)
                    {
                        $coef_o = 1;
                        $coef_v = 0.5;
                    } elseif ($phase_e == 60)
                    {
                        $coef_o = 0.7;
                        $coef_v = 0.2;
                    } elseif ($phase_e == 90)
                    {
                        $coef_o = 0.2;
                        $coef_v = 0.9;
                    } elseif ($phase_e == 120)
                    {
                        $coef_o = 0.8;
                        $coef_v = 0.2;
                    } elseif ($phase_e == 180)
                    {
                        $coef_o = 0.7;
                        $coef_v = 0.7;
                    }
                    $ret['obverse'][$i] += $imp_o[$k] * $coef_o * $phase_o;
                    $ret['versa'][$i] += $imp_v[$k] * $coef_v * $phase_o;
                } // 北交点
                elseif (in_array($i, [0, 1, 2, 3, 4, ASC, MC]) && $k == 12)
                {
                    if ($phase_e == 0) $coef_o = 1;
                    elseif ($phase_e == 60) $coef_o = 0.7;
                    elseif ($phase_e == 90) $coef_o = 0.7;
                    elseif ($phase_e == 120) $coef_o = 0.7;
                    elseif ($phase_e == 180) $coef_o = 1;
                    $ret['obverse'][$i] += $imp_o[$k] * $coef_o * $phase_o;

                } elseif ($k == ASC || $k == MC)
                {
                    if ($phase_e == 0) $coef_o = 1;
                    elseif ($phase_e == 60) $coef_o = 0.6;
                    elseif ($phase_e == 90)
                    {
                        $coef_o = 0.2;
                        $coef_v = 0.8;
                    } elseif ($phase_e == 120) $coef_o = 0.65;
                    elseif ($phase_e == 180) $coef_o = 0.9;
                    $ret['obverse'][$i] += $imp_o[$k] * $coef_o * $phase_o;
                    $ret['versa'][$i] += $imp_v[$k] * $coef_v * $phase_o;
                }
            }
        }
        return $ret;
    }

    /**
     * 获取阴阳系数
     * 有日月分别合轴则以日月拱论；有金火分别合轴则以金火拱论
     * @return array [日月阴阳系数,金火阴阳系数]
     */
    protected function getTheYinyangScore()
    {
        $ret = [0, 0];
//        $a = $data->details1;// a用户底盘
        $b = $this->option['data2'];// b用户
        $planets = $b['planets'];
        // 日月阴阳系数
        if (isset($planets[0]['phase']['0-1']))
        {
            $phase = $planets[0]['phase']['0-1']['phase_e'];
            if (
                (
                    (isset($planets[0]['phase']['0-' . ASC]) && in_array($planets[0]['phase']['0-' . ASC]['phase_e'], [0, 180]))
                    || (isset($planets[0]['phase']['0-' . MC]) && in_array($planets[0]['phase']['0-' . MC]['phase_e'], [0, 180]))
                )
                && (
                    (isset($planets[1]['phase']['1-' . ASC]) && in_array($planets[1]['phase']['1-' . ASC]['phase_e'], [0, 180]))
                    || (isset($planets[1]['phase']['1-' . MC]) && in_array($planets[1]['phase']['1-' . MC]['phase_e'], [0, 180]))
                )
            )
            {
                $phase = 120;
            }
            if ($phase == 0) $ret[0] = 1;
            elseif ($phase == 60) $ret[0] = 0.8;
            elseif ($phase == 90) $ret[0] = 0.4;
            elseif ($phase == 120) $ret[0] = 0.9;
            elseif ($phase == 180) $ret[0] = 0.7;
        }
        // 金火阴阳系数
        if (isset($planets[3]['phase']['3-4']))
        {
            $phase = $planets[3]['phase']['3-4']['phase_e'];
            if (
                (
                    (isset($planets[3]['phase']['3-' . ASC]) && in_array($planets[3]['phase']['3-' . ASC]['phase_e'], [0, 180]))
                    || (isset($planets[3]['phase']['3-' . MC]) && in_array($planets[3]['phase']['3-' . MC]['phase_e'], [0, 180]))
                )
                && (
                    (isset($planets[4]['phase']['4-' . ASC]) && in_array($planets[4]['phase']['4-' . ASC]['phase_e'], [0, 180]))
                    || (isset($planets[4]['phase']['4-' . MC]) && in_array($planets[4]['phase']['4-' . MC]['phase_e'], [0, 180]))
                )
            )
            {
                $phase = 120;
            }
            if ($phase == 0) $ret[1] = 1;
            elseif ($phase == 60) $ret[1] = 0.8;
            elseif ($phase == 90) $ret[1] = 0.4;
            elseif ($phase == 120) $ret[1] = 0.9;
            elseif ($phase == 180) $ret[1] = 0.7;
        }
        return $ret;
    }

    /**
     * 吸引指数
     * 基数=金星正指数-金星负指数
     * 1、若存在日月、金火非刑相，每有一组则+50*相位系数*容许度系数（相位系数：合1，拱0.85，六分0.75，冲0.9）；
     * 2、若一方火星刑对方金星，其金星也刑对方火星，或其金星与对分月亮或太阳合拱六分，此时若其金星无刑相位且不与土星成相，+36；
     * 3、若一方太阳或月亮进入对方的5或7宫，每有一个+15
     * ##########4、一方金星若与对方土星刑冲，-35
     * 4、若一方太阳或月亮与对方上升或下降相合，每有一个+20
     * 5、若一方太阳或月亮与对方天顶或天底相合，每有一个+15
     * @return int
     */
    protected function getTheAttractScore()
    {
        $ret = 0;
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];

        $ret += ($coef1['obverse'][3] + $coef2['obverse'][3]) - ($coef1['versa'][3] + $coef2['versa'][3]);

        $planets1 = $this->option['data1'][1]['planets'];// 外圈数据B
        $planets2 = $this->option['data2'][1]['planets'];// 外圈数据A
        $phase_e = $phase_o = 0;
        // 若存在日月、金火非刑相，每有一组则+50*相位系数*容许度系数（相位系数：合1，拱0.85，六分0.75，冲0.9）；
        // 日月
        if (isset($planets1[0]['phase']['0-1']) && $planets1[0]['phase']['0-1']['phase_e'] != 90)
        {
            $_e = $planets1[0]['phase']['0-1']['phase_e'];
            $_orb = $planets1[0]['phase']['0-1']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            elseif ($_orb > 5) $phase_o = 0.75;
            $ret += 50 * $phase_e * $phase_o;
        }
        // 月日
        if (isset($planets1[1]['phase']['1-0']) && $planets1[1]['phase']['1-0']['phase_e'] != 90)
        {
            $_e = $planets1[1]['phase']['1-0']['phase_e'];
            $_orb = $planets1[1]['phase']['1-0']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            elseif ($_orb > 5) $phase_o = 0.75;
            $ret += 50 * $phase_e * $phase_o;
        }
        // 金火
        if (isset($planets1[3]['phase']['3-4']) && $planets1[3]['phase']['3-4']['phase_e'] != 90)
        {
            $_e = $planets1[3]['phase']['3-4']['phase_e'];
            $_orb = $planets1[3]['phase']['3-4']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            elseif ($_orb > 5) $phase_o = 0.75;
            $ret += 50 * $phase_e * $phase_o;
        }
        // 火金
        if (isset($planets2[3]['phase']['3-4']) && $planets2[3]['phase']['3-4']['phase_e'] != 90)
        {
            $_e = $planets2[3]['phase']['3-4']['phase_e'];
            $_orb = $planets2[3]['phase']['3-4']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            elseif ($_orb > 5) $phase_o = 0.75;
            $ret += 50 * $phase_e * $phase_o;
        }
        // 若一方火星刑对方金星，其金星也刑对方火星，或其金星与月亮或太阳合拱六分，此时若其金星无刑相位且不与土星成相，+36；
        if (isset($planets1[4]['phase']['4-3']) && $planets1[4]['phase']['4-3']['phase_e'] == 90
            && (
                (isset($planets1[3]['phase']['3-4']) && $planets1[3]['phase']['3-4']['phase_e'] == 90)
                || (isset($planets1[3]['phase']['3-0']) && in_array($planets1[3]['phase']['3-0']['phase_e'], [0, 60, 120]))
                || (isset($planets1[3]['phase']['3-1']) && in_array($planets1[3]['phase']['3-1']['phase_e'], [0, 60, 120]))
            ) && !isset($planets1[3]['phase']['3-6'])
        )
        {
            $venu_phase90_num = 0;
            foreach ($planets1[3]['phase'] as $ph)
            {
                if ($ph['phase_e'] == 90) $venu_phase90_num++;
            }
            if ($venu_phase90_num == 0) $ret += 36;
        }
        if (isset($planets2[4]['phase']['4-3']) && $planets2[4]['phase']['4-3']['phase_e'] == 90
            && (
                (isset($planets2[3]['phase']['3-4']) && $planets2[3]['phase']['3-4']['phase_e'] == 90)
                || (isset($planets2[3]['phase']['3-0']) && in_array($planets2[3]['phase']['3-0']['phase_e'], [0, 60, 120]))
                || (isset($planets2[3]['phase']['3-1']) && in_array($planets2[3]['phase']['3-1']['phase_e'], [0, 60, 120]))
            ) && !isset($planets2[3]['phase']['3-6'])
        )
        {
            $venu_phase90_num = 0;
            foreach ($planets2[3]['phase'] as $ph)
            {
                if ($ph['phase_e'] == 90) $venu_phase90_num++;
            }
            if ($venu_phase90_num == 0) $ret += 36;
        }
        // 若一方太阳或月亮进入对方的5或7宫，每有一个+20
        if (in_array($planets1[0]['in_house_id'], [5, 7]))
        {
            $ret += 20;
        }
        if (in_array($planets1[1]['in_house_id'], [5, 7]))
        {
            $ret += 20;
        }
        if (in_array($planets2[0]['in_house_id'], [5, 7]))
        {
            $ret += 20;
        }
        if (in_array($planets2[1]['in_house_id'], [5, 7]))
        {
            $ret += 20;
        }
        // 若一方金火进入对方的5或7宫，每有一个+15
        if (in_array($planets1[3]['in_house_id'], [5, 7]))
        {
            $ret += 15;
        }
        if (in_array($planets1[4]['in_house_id'], [5, 7]))
        {
            $ret += 15;
        }
        if (in_array($planets2[3]['in_house_id'], [5, 7]))
        {
            $ret += 15;
        }
        if (in_array($planets2[4]['in_house_id'], [5, 7]))
        {
            $ret += 15;
        }
        // 一方金星若与对方土星刑冲，-35
        if (isset($planets1[3]['phase']['3-6']) && in_array($planets1[3]['phase']['3-6']['phase_e'], [90, 180]))
        {
            $ret -= 35;
        }
        if (isset($planets1[6]['phase']['6-3']) && in_array($planets1[6]['phase']['6-3']['phase_e'], [90, 180]))
        {
            $ret -= 35;
        }
        // 月亮与对方土星刑冲-40  去掉  20180119 by gks

        // 若存在日月金火之间的冲相位，每个+8
        for ($i = 0; $i < 5; $i++)
        {
            if ($i == 2) continue;
            for ($j = 0; $j < 5; $j++)
            {
                if ($j == 2 || $j < $i) continue;

                if (isset($planets1[$i]['phase'][$i . '-' . $j]) && $planets1[$i]['phase'][$i . '-' . $j]['phase_e'] == 180)
                {
                    $ret += 8;
                }
                if (isset($planets2[$i]['phase'][$i . '-' . $j]) && $planets2[$i]['phase'][$i . '-' . $j]['phase_e'] == 180)
                {
                    $ret += 8;
                }
            }
        }
        // 若有一方日月金火之一与对方日月金水火木两颗以上成非刑相，+6*x（x为相位个数，多个类似情况只计分一次,按相位多的记分）
        $t_o = [];
        for ($i = 0; $i < 5; $i++)
        {
            if ($i == 2) continue;
            $x1 = 0;
            $x2 = 0;
            for ($j = 0; $j < 6; $j++)
            {
                if (isset($planets1[$i]['phase'][$i . '-' . $j]) && $planets1[$i]['phase'][$i . '-' . $j]['phase_e'] != 90)
                {
                    $x1++;
                }
                if (isset($planets2[$i]['phase'][$i . '-' . $j]) && $planets2[$i]['phase'][$i . '-' . $j]['phase_e'] != 90)
                {
                    $x2++;
                }
            }
            if ($x1 > 2) $t_o[] = $x1;
            if ($x2 > 2) $t_o[] = $x2;
        }
        if (count($t_o) > 0)
        {
            $ret += (max($t_o) * 6);
        }

        // 若一方太阳或月亮与对方上升或下降相合，每有一个+20
        // 日升
        if (isset($planets1[0]['phase']['0-' . ASC]) && in_array($planets1[0]['phase']['0-' . ASC]['phase_e'], [0, 180]))
        {
            $ret += 20;
        }
        // 升日
        if (isset($planets1[ASC]['phase'][ASC . '-0']) && in_array($planets1[ASC]['phase'][ASC . '-0']['phase_e'], [0, 180]))
        {
            $ret += 20;
        }
        // 月升
        if (isset($planets1[1]['phase']['1-' . ASC]) && in_array($planets1[1]['phase']['1-' . ASC]['phase_e'], [0, 180]))
        {
            $ret += 20;
        }
        // 升月
        if (isset($planets1[ASC]['phase'][ASC . '-1']) && in_array($planets1[ASC]['phase'][ASC . '-1']['phase_e'], [0, 180]))
        {
            $ret += 20;
        }
        // 若一方太阳或月亮与对方天顶或天底相合，每有一个+15
        // 日顶
        if (isset($planets1[0]['phase']['0-' . MC]) && in_array($planets1[0]['phase']['0-' . MC]['phase_e'], [0, 180]))
        {
            $ret += 15;
        }
        // 顶日
        if (isset($planets1[MC]['phase'][MC . '-0']) && in_array($planets1[MC]['phase'][MC . '-0']['phase_e'], [0, 180]))
        {
            $ret += 15;
        }
        // 月顶
        if (isset($planets1[1]['phase']['1-' . MC]) && in_array($planets1[1]['phase']['1-' . MC]['phase_e'], [0, 180]))
        {
            $ret += 15;
        }
        // 顶月
        if (isset($planets1[MC]['phase'][MC . '-1']) && in_array($planets1[MC]['phase'][MC . '-1']['phase_e'], [0, 180]))
        {
            $ret += 15;
        }

        return $ret;
    }

    /**
     * 前缘指数
     * 基数=北交点正指数*2+海王星正指数+冥王星正指数
     * @return int
     */
    protected function getTheFateScore()
    {
        $ret = 0;
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];

        $ret += ($coef1['obverse'][12] + $coef2['obverse'][12]) * 2
            + $coef1['obverse'][8] + $coef2['obverse'][8]
            + $coef1['obverse'][9] + $coef2['obverse'][9];
        return $ret;
    }

    /**
     * 沟通指数
     * 基数=月亮正指数+水星正指数-水星负指数-月亮负指数
     * #######若双方水星有且只有与对方月、水、日、金、木、上升、中天的合拱六分相，+35；######
     * #######若双方月亮有且只有与对方月、水、日、金、木、上升、中天的合拱六分相，+50；######
     * 若双方水星都有与对方月、水、日、金、木的合拱六分相，且无刑冲相位，也无火、土相位，则加35
     * 若双方月亮都有与对方月、水、日、金、木的合拱六分相，且无刑冲相位，也无火、土相位，则加50
     * @return int
     */
    protected function getTheChatScore()
    {
        $ret = 0;
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];

//        $ret += $coef1['obverse'][1] + $coef2['obverse'][1]
//            + $coef1['obverse'][2] + $coef2['obverse'][2]
//            - $coef1['versa'][1] - $coef2['versa'][1] - $coef1['versa'][2] - $coef2['versa'][2];
//        $ret += ($coef1['obverse'][2] + $coef2['obverse'][2]) * 1.5 + ($coef1['obverse'][1] + $coef2['obverse'][1]) * 0.5;
        $housePower = $this->getTheHousePower();// 宫位能量  0 正 | 1 负
//        沟通=30+水正-水负+9正-9负+3正-3负
        $ret += 30 + ($coef1['obverse'][2] + $coef2['obverse'][2]) - $coef1['versa'][2] - $coef2['versa'][2]
            + $housePower[0][9] - $housePower[1][9] + $housePower[0][3] - $housePower[1][3];

        $planets1 = $this->option['data1'][1]['planets'];
        $planets2 = $this->option['data2'][1]['planets'];
        // 双方月亮无与火星土星天王海王冥王的合刑冲，且无与日月金水的刑相位，且至少有一个与日月金木的合拱六分相
        if (
            (!isset($planets1[1]['phase']['1-4']) || !in_array($planets1[1]['phase']['1-4']['phase_e'], [0, 90, 180]))
            && (!isset($planets1[1]['phase']['1-6']) || !in_array($planets1[1]['phase']['1-6']['phase_e'], [0, 90, 180]))
            && (!isset($planets1[1]['phase']['1-7']) || !in_array($planets1[1]['phase']['1-7']['phase_e'], [0, 90, 180]))
            && (!isset($planets1[1]['phase']['1-8']) || !in_array($planets1[1]['phase']['1-8']['phase_e'], [0, 90, 180]))
            && (!isset($planets1[1]['phase']['1-9']) || !in_array($planets1[1]['phase']['1-9']['phase_e'], [0, 90, 180]))
            && (!isset($planets2[1]['phase']['1-4']) || !in_array($planets2[1]['phase']['1-4']['phase_e'], [0, 90, 180]))
            && (!isset($planets2[1]['phase']['1-6']) || !in_array($planets2[1]['phase']['1-6']['phase_e'], [0, 90, 180]))
            && (!isset($planets2[1]['phase']['1-7']) || !in_array($planets2[1]['phase']['1-7']['phase_e'], [0, 90, 180]))
            && (!isset($planets2[1]['phase']['1-8']) || !in_array($planets2[1]['phase']['1-8']['phase_e'], [0, 90, 180]))
            && (!isset($planets2[1]['phase']['1-9']) || !in_array($planets2[1]['phase']['1-9']['phase_e'], [0, 90, 180]))
            && (!isset($planets1[1]['phase']['1-0']) || $planets1[1]['phase']['1-0']['phase_e'] != 90)
            && (!isset($planets1[1]['phase']['1-1']) || $planets1[1]['phase']['1-1']['phase_e'] != 90)
            && (!isset($planets1[1]['phase']['1-2']) || $planets1[1]['phase']['1-2']['phase_e'] != 90)
            && (!isset($planets1[1]['phase']['1-3']) || $planets1[1]['phase']['1-3']['phase_e'] != 90)
            && (!isset($planets2[1]['phase']['1-0']) || $planets2[1]['phase']['1-0']['phase_e'] != 90)
            && (!isset($planets2[1]['phase']['1-2']) || $planets2[1]['phase']['1-2']['phase_e'] != 90)
            && (!isset($planets2[1]['phase']['1-3']) || $planets2[1]['phase']['1-3']['phase_e'] != 90)
            &&
            (
                (isset($planets1[1]['phase']['1-0']) && in_array($planets1[1]['phase']['1-0']['phase_e'], [0, 60, 120]))
                || (isset($planets1[1]['phase']['1-1']) && in_array($planets1[1]['phase']['1-1']['phase_e'], [0, 60, 120]))
                || (isset($planets1[1]['phase']['1-3']) && in_array($planets1[1]['phase']['1-3']['phase_e'], [0, 60, 120]))
                || (isset($planets1[1]['phase']['1-5']) && in_array($planets1[1]['phase']['1-5']['phase_e'], [0, 60, 120]))
            )
            &&
            (
                (isset($planets2[1]['phase']['1-0']) && in_array($planets2[1]['phase']['1-0']['phase_e'], [0, 60, 120]))
                || (isset($planets2[1]['phase']['1-1']) && in_array($planets2[1]['phase']['1-1']['phase_e'], [0, 60, 120]))
                || (isset($planets2[1]['phase']['1-3']) && in_array($planets2[1]['phase']['1-3']['phase_e'], [0, 60, 120]))
                || (isset($planets2[1]['phase']['1-5']) && in_array($planets2[1]['phase']['1-5']['phase_e'], [0, 60, 120]))
            )
        )
        {
            $ret += 50;
        }

        $merc1_phase_b = [0, 0];
        if (!empty($planets1[2]['phase']))
        {
            foreach ($planets1[2]['phase'] as $merc1_phase)
            {
                if ($merc1_phase['id'] > 9 || $merc1_phase['id'] < ASC) continue;
                if (in_array($merc1_phase['phase_e'], [0, 60, 120]))
                {

                    if (in_array($merc1_phase['id'], [0, 1, 2, 3, 5]))
                    {
                        $merc1_phase_b[0]++;
                    } else
                    {
                        $merc1_phase_b[1]++;
                    }
                }
                if (in_array($merc1_phase['phase_e'], [90, 180]))
                {
                    $merc1_phase_b[1]++;
                }
            }
        }
        $merc2_phase_b = [0, 0];
        if (!empty($planets2[2]['phase']))
        {
            foreach ($planets2[2]['phase'] as $merc2_phase)
            {
                if ($merc2_phase['id'] > 9 || $merc2_phase['id'] < ASC) continue;
                if (in_array($merc2_phase['phase_e'], [0, 60, 120]))
                {

                    if (in_array($merc2_phase['id'], [0, 1, 2, 3, 5]))
                    {
                        $merc2_phase_b[0]++;
                    } else
                    {
                        $merc2_phase_b[1]++;
                    }
                }
                if (in_array($merc2_phase['phase_e'], [90, 180]))
                {
                    $merc2_phase_b[1]++;
                }
            }
        }
        if ($merc1_phase_b[0] && !$merc1_phase_b[1] && $merc2_phase_b[0] && !$merc2_phase_b[1])
        {
            $ret += 35;
        }
        // 若双方水星均与对方木星或月亮成合拱六分相，+25
        if (
            (
                isset($planets1[2]['phase']['2-1']) && in_array($planets1[2]['phase']['2-1']['phase_e'], [0, 60, 120])
                || isset($planets1[2]['phase']['2-5']) && in_array($planets1[2]['phase']['2-5']['phase_e'], [0, 60, 120])
            )
            &&
            (
                isset($planets2[2]['phase']['2-1']) && in_array($planets2[2]['phase']['2-1']['phase_e'], [0, 60, 120])
                || isset($planets2[2]['phase']['2-5']) && in_array($planets2[2]['phase']['2-5']['phase_e'], [0, 60, 120])
            )
        )
        {
            $ret += 25;
        }

//        若双方水星互相刑-15；
        if (isset($planets1[2]['phase']['2-2']) && $planets1[2]['phase']['2-2']['phase_e'] == 90)
        {
            $ret -= 15;
        }
//        若一方水星与另一方土星刑冲-15；
        if (
            (isset($planets1[2]['phase']['2-6']) && in_array($planets1[2]['phase']['2-6']['phase_e'], [90, 180]))
            || (isset($planets2[2]['phase']['2-6']) && in_array($planets2[2]['phase']['2-6']['phase_e'], [90, 180]))
        )
        {
            $ret -= 15;
        }
//        若一方水星与另一方月亮刑-18；
        if (
            (isset($planets1[2]['phase']['2-1']) && $planets1[2]['phase']['2-1']['phase_e'] == 90)
            || (isset($planets2[2]['phase']['2-1']) && $planets2[2]['phase']['2-1']['phase_e'] == 90)
        )
        {
            $ret -= 18;
        }
//        若一方水星与另一方月亮对冲-12；
        if (
            (isset($planets1[2]['phase']['2-1']) && $planets1[2]['phase']['2-1']['phase_e'] == 180)
            || (isset($planets2[2]['phase']['2-1']) && $planets2[2]['phase']['2-1']['phase_e'] == 180)
        )
        {
            $ret -= 12;
        }
//        若一方水星与另一方火星刑冲-12；
        if (
            (isset($planets1[2]['phase']['2-4']) && in_array($planets1[2]['phase']['2-4']['phase_e'], [90, 180]))
            || (isset($planets2[2]['phase']['2-4']) && in_array($planets2[2]['phase']['2-4']['phase_e'], [90, 180]))
        )
        {
            $ret -= 12;
        }
//        若一方水星与另一方太阳刑-13；
        if (
            (isset($planets1[2]['phase']['2-0']) && $planets1[2]['phase']['2-0']['phase_e'] == 90)
            || (isset($planets2[2]['phase']['2-0']) && $planets2[2]['phase']['2-0']['phase_e'] == 90)
        )
        {
            $ret -= 13;
        }
//        若一方水星与另一方太阳对冲-9；
        if (
            (isset($planets1[2]['phase']['2-0']) && $planets1[2]['phase']['2-0']['phase_e'] == 180)
            || (isset($planets2[2]['phase']['2-0']) && $planets2[2]['phase']['2-0']['phase_e'] == 180)
        )
        {
            $ret -= 9;
        }
//        若一方土星落对方3宫-10，若此时土星刑冲对方日月水，每个-10
        if (
            $planets1[6]['in_house_id'] == 3 || $planets2[6]['in_house_id'] == 3
        )
        {
            $ret -= 10;
            if ($planets1[6]['in_house_id'] == 3)
            {
                if (isset($planets1[6]['phase']['6-0']) && in_array($planets1[6]['phase']['6-0']['phase_e'], [90, 180]))
                {
                    $ret -= 10;
                }
                if (isset($planets1[6]['phase']['6-1']) && in_array($planets1[6]['phase']['6-1']['phase_e'], [90, 180]))
                {
                    $ret -= 10;
                }
                if (isset($planets1[6]['phase']['6-2']) && in_array($planets1[6]['phase']['6-2']['phase_e'], [90, 180]))
                {
                    $ret -= 10;
                }
            }
            if ($planets2[6]['in_house_id'] == 3)
            {
                if (isset($planets2[6]['phase']['6-0']) && in_array($planets2[6]['phase']['6-0']['phase_e'], [90, 180]))
                {
                    $ret -= 10;
                }
                if (isset($planets2[6]['phase']['6-1']) && in_array($planets2[6]['phase']['6-1']['phase_e'], [90, 180]))
                {
                    $ret -= 10;
                }
                if (isset($planets2[6]['phase']['6-2']) && in_array($planets2[6]['phase']['6-2']['phase_e'], [90, 180]))
                {
                    $ret -= 10;
                }
            }
        }

        return $ret;
    }

    /**
     * 激情指数
     * 基数=火星正指数
     * 若存在火金、火火非刑相，每个+40*相位系数*容许系数；
     * 若存在日火、月火非刑相，每个+20*相位系数*容许系数；
     * 若存在火星与土星的合刑冲相，每个-30*相位系数*容许系数；
     * @return int
     */
    protected function getThePassionScore()
    {
        $ret = 0;
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];

        $planets1 = $this->option['data1'][1]['planets'];
        $planets2 = $this->option['data2'][1]['planets'];

        $ret += $coef1['obverse'][4] + $coef2['obverse'][4];
        $phase_e = 0;
        // 若存在火金、火火非刑相，每个+40*相位系数*容许系数；
        // 火金
        if (isset($planets1[4]['phase']['4-3']) && $planets1[4]['phase']['4-3']['phase_e'] != 90)
        {
            $_e = $planets1[4]['phase']['4-3']['phase_e'];
            $_orb = $planets1[4]['phase']['4-3']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret += 40 * $phase_e * $phase_o;
            // （若双方为一男一女，成相火星属于男方，则额外+20）
            if ($this->option['recode1']['type'] != 1 && $this->option['recode2']['type'] == 1)
            {
                $ret += 20;
            }
        }
        // 金火
        if (isset($planets1[3]['phase']['3-4']) && $planets1[3]['phase']['3-4']['phase_e'] != 90)
        {
            $_e = $planets1[3]['phase']['3-4']['phase_e'];
            $_orb = $planets1[3]['phase']['3-4']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret += 40 * $phase_e * $phase_o;
            // （若双方为一男一女，成相火星属于男方，则额外+20）
            if ($this->option['recode1']['type'] == 1 && $this->option['recode2']['type'] != 1)
            {
                $ret += 20;
            }
        }
        // 火火
        if (isset($planets1[4]['phase']['4-4']) && $planets1[4]['phase']['4-4']['phase_e'] != 90)
        {
            $_e = $planets1[4]['phase']['4-4']['phase_e'];
            $_orb = $planets1[4]['phase']['4-4']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret += 40 * $phase_e * $phase_o;
            // （若双方为一男一女，成相火星属于男方，则额外+20）
            if ($this->option['recode1']['type'] == 1 && $this->option['recode2']['type'] != 1)
            {
                $ret += 20;
            }
        }
        // 若存在日火、月火非刑相，每个+20*相位系数*容许系数；
        // 日火
        if (isset($planets1[0]['phase']['0-4']) && $planets1[0]['phase']['0-4']['phase_e'] != 90)
        {
            $_e = $planets1[0]['phase']['0-4']['phase_e'];
            $_orb = $planets1[0]['phase']['0-4']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret += 20 * $phase_e * $phase_o;
        }
        // 火日
        if (isset($planets1[4]['phase']['4-0']) && $planets1[4]['phase']['4-0']['phase_e'] != 90)
        {
            $_e = $planets1[4]['phase']['4-0']['phase_e'];
            $_orb = $planets1[4]['phase']['4-0']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret += 20 * $phase_e * $phase_o;
        }
        // 月火
        if (isset($planets1[1]['phase']['1-4']) && $planets1[1]['phase']['1-4']['phase_e'] != 90)
        {
            $_e = $planets1[1]['phase']['1-4']['phase_e'];
            $_orb = $planets1[1]['phase']['1-4']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret += 20 * $phase_e * $phase_o;
        }
        // 火月
        if (isset($planets1[4]['phase']['4-1']) && $planets1[4]['phase']['4-1']['phase_e'] != 90)
        {
            $_e = $planets1[4]['phase']['4-1']['phase_e'];
            $_orb = $planets1[4]['phase']['4-1']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret += 20 * $phase_e * $phase_o;
        }
        // 若存在火星与土星的合刑冲相，每个-30*相位系数*容许系数；
        // 火土
        if (isset($planets1[4]['phase']['4-6']) && in_array($planets1[4]['phase']['4-6']['phase_e'], [0, 90, 180]))
        {
            $_e = $planets1[4]['phase']['4-6']['phase_e'];
            $_orb = $planets1[4]['phase']['4-6']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret -= 30 * $phase_e * $phase_o;
        }
        // 土火
        if (isset($planets1[6]['phase']['6-4']) && in_array($planets1[6]['phase']['6-4']['phase_e'], [0, 90, 180]))
        {
            $_e = $planets1[6]['phase']['6-4']['phase_e'];
            $_orb = $planets1[6]['phase']['6-4']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 90) $phase_e = 0.8;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            if ($phase_e) $ret -= 30 * $phase_e * $phase_o;
        }
        // 若一方火星进入对方1/5/7宫，+10；若双方均如此，再加20
        if (in_array($planets1[4]['in_house_id'], [1, 5, 7]))
        {
            $ret += 10;
        }
        if (in_array($planets2[4]['in_house_id'], [1, 5, 7]))
        {
            $ret += 10;
        }
        if (in_array($planets1[4]['in_house_id'], [1, 5, 7]) && in_array($planets2[4]['in_house_id'], [1, 5, 7]))
        {
            $ret += 20;
        }
        return $ret;
    }

    /**
     * 长久指数
     * 基数=Asc+Mc的正指数合 + 太阳的正指数合 +月亮的正指数合+土星的正指数合-月亮的负指数合-太阳的负指数合-ASC的负指数合-MC的负指数合-天王星的负指数合；
     * 若天王星与轴点合相，每多一组*0.8；
     * @return float
     */
    protected function getThePermanentlyScore()
    {
        $ret = 0;
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];

        $ret += $coef1['obverse'][ASC] + $coef2['obverse'][ASC] + $coef1['obverse'][MC] + $coef2['obverse'][MC]
            + $coef1['obverse'][0] + $coef2['obverse'][0] + $coef1['obverse'][1] + $coef2['obverse'][1]
            + $coef1['obverse'][6] + $coef2['obverse'][6]
            - $coef1['versa'][0] - $coef2['versa'][0] - $coef1['versa'][1] - $coef2['versa'][1]
            - $coef1['versa'][ASC] - $coef2['versa'][ASC] - $coef1['versa'][MC] - $coef2['versa'][MC]
            - $coef1['versa'][7] - $coef2['versa'][7];
        $planet1 = $this->option['data1'][1];
        $planet2 = $this->option['data2'][1];
        if (isset($planet1['planets'][7]['phase']['7-' . ASC]) && in_array($planet1['planets'][7]['phase']['7-' . ASC]['phase_e'], [0, 180]))
        {
            $ret *= 0.8;
        }
        if (isset($planet1['planets'][7]['phase']['7-' . MC]) && in_array($planet1['planets'][7]['phase']['7-' . MC]['phase_e'], [0, 180]))
        {
            $ret *= 0.8;
        }
        if (isset($planet2['planets'][7]['phase']['7-' . ASC]) && in_array($planet2['planets'][7]['phase']['7-' . ASC]['phase_e'], [0, 180]))
        {
            $ret *= 0.8;
        }
        if (isset($planet2['planets'][7]['phase']['7-' . MC]) && in_array($planet2['planets'][7]['phase']['7-' . MC]['phase_e'], [0, 180]))
        {
            $ret *= 0.8;
        }

        return $ret;
    }

    /**
     * 亲密指数
     * 基数=月亮正指数-月亮负指数
     * 若存在月合上升、日月合拱六分、月月合拱六分、月金合拱六分，每多一组则+30*相位系数*容许系数；
     * 若双方月亮都与对方日月金木之一成合拱六分，且除日月金水木上升中天的合拱六分外无其它相位，+50
     * @return float
     */
    protected function getTheintimateScore()
    {
        $ret = 0;
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];
        $ret += $coef1['obverse'][1] + $coef2['obverse'][1] - $coef1['versa'][1] - $coef2['versa'][1];

        $planets1 = $this->option['data1'][1]['planets'];
        $planets2 = $this->option['data2'][1]['planets'];
        $phase_e = 0;
        // 若存在月合上升、日月合拱六分、月月合拱六分、月金合拱六分，每多一组则+30*相位系数*容许系数；
        // 月上升
        if (isset($planets1[1]['phase']['1-' . ASC]) && $planets1[1]['phase']['1-' . ASC]['phase_e'] == 0)
        {
            $_e = $planets1[1]['phase']['1-' . ASC]['phase_e'];
            $_orb = $planets1[1]['phase']['1-' . ASC]['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            $ret += 30 * $phase_e * $phase_o;
        }
        // 上升月
        if (isset($planets1[ASC]['phase'][ASC . '-1']) && $planets1[ASC]['phase'][ASC . '-1']['phase_e'] == 0)
        {
            $_e = $planets1[ASC]['phase'][ASC . '-1']['phase_e'];
            $_orb = $planets1[ASC]['phase'][ASC . '-1']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            $ret += 30 * $phase_e * $phase_o;
        }
        // 月月
        if (isset($planets1[1]['phase']['1-1']) && in_array($planets1[1]['phase']['1-1']['phase_e'], [0, 60, 120]))
        {
            $_e = $planets1[1]['phase']['1-1']['phase_e'];
            $_orb = $planets1[1]['phase']['1-1']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            $ret += 30 * $phase_e * $phase_o;
        }
        // 日月
        if (isset($planets1[0]['phase']['0-1']) && in_array($planets1[0]['phase']['0-1']['phase_e'], [0, 60, 120]))
        {
            $_e = $planets1[0]['phase']['0-1']['phase_e'];
            $_orb = $planets1[0]['phase']['0-1']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            $ret += 30 * $phase_e * $phase_o;
        }
        // 月日
        if (isset($planets1[1]['phase']['1-0']) && in_array($planets1[1]['phase']['1-0']['phase_e'], [0, 60, 120]))
        {
            $_e = $planets1[1]['phase']['1-0']['phase_e'];
            $_orb = $planets1[1]['phase']['1-0']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            $ret += 30 * $phase_e * $phase_o;
        }
        // 月金
        if (isset($planets1[1]['phase']['1-3']) && in_array($planets1[1]['phase']['1-3']['phase_e'], [0, 60, 120]))
        {
            $_e = $planets1[1]['phase']['1-3']['phase_e'];
            $_orb = $planets1[1]['phase']['1-3']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            $ret += 30 * $phase_e * $phase_o;
        }
        // 金月
        if (isset($planets1[3]['phase']['3-1']) && in_array($planets1[3]['phase']['3-1']['phase_e'], [0, 60, 120]))
        {
            $_e = $planets1[3]['phase']['3-1']['phase_e'];
            $_orb = $planets1[3]['phase']['3-1']['phase_orb'];
            if ($_e == 0) $phase_e = 1;
            elseif ($_e == 60) $phase_e = 0.75;
            elseif ($_e == 120) $phase_e = 0.85;
            elseif ($_e == 180) $phase_e = 0.9;
            if ($_orb < 0.5) $phase_o = 1;
            elseif ($_orb < 1.5) $phase_o = 0.9;
            elseif ($_orb < 3) $phase_o = 0.85;
            elseif ($_orb <= 5) $phase_o = 0.8;
            else $phase_o = 0.75;
            $ret += 30 * $phase_e * $phase_o;
        }
        // 若一方月亮是该星盘中与对方日月金水火四轴非刑相最多的星体且非刑相不少于3个，+25
        $foreach_list = [0, 1, 2, 3, 4, ASC, MC];
        $no_90_1 = $no_90_2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
        for ($i = 0; $i < 10; $i++)
        {
            foreach ($foreach_list as $fl)
            {
                if (isset($planets1[$fl]['phase'][$fl . '-' . $i]) && $planets1[$fl]['phase'][$fl . '-' . $i]['phase_e'] != 90)
                {
                    $no_90_1[$i]++;
                }
                if (isset($planets2[$fl]['phase'][$fl . '-' . $i]) && $planets2[$fl]['phase'][$fl . '-' . $i]['phase_e'] != 90)
                {
                    $no_90_2[$i]++;
                }
            }
        }
        $max_90_num_1 = max($no_90_1);
        $max_90_num_2 = max($no_90_2);
        if (($max_90_num_1 >= 3 && $max_90_num_1 == $no_90_1[1]) || ($max_90_num_2 >= 3 && $max_90_num_2 == $no_90_2[1]))
        {
            $ret += 25;
        }
        // 若双方月亮在同一星座，亲密低于40者令其=40；
        // 若双方月亮在同象星座，亲密低于25者令其=25；
        // 若双方月亮均无月火土天刑冲相，亲密低于30者都令其=30
        if ($planets1[1]['in_sign_id'] == $planets2[1]['in_sign_id'] && $ret < 40)
        {
            $ret = 40;
        } elseif (
            (!isset($planets1[1]['phase']['1-1']) || !in_array($planets1[1]['phase']['1-1']['phase_e'], [90, 180]))
            && (!isset($planets1[1]['phase']['1-4']) || !in_array($planets1[1]['phase']['1-4']['phase_e'], [90, 180]))
            && (!isset($planets1[1]['phase']['1-6']) || !in_array($planets1[1]['phase']['1-6']['phase_e'], [90, 180]))
            && (!isset($planets1[1]['phase']['1-7']) || !in_array($planets1[1]['phase']['1-7']['phase_e'], [90, 180]))
            && (!isset($planets2[1]['phase']['1-1']) || !in_array($planets2[1]['phase']['1-1']['phase_e'], [90, 180]))
            && (!isset($planets2[1]['phase']['1-4']) || !in_array($planets2[1]['phase']['1-4']['phase_e'], [90, 180]))
            && (!isset($planets2[1]['phase']['1-6']) || !in_array($planets2[1]['phase']['1-6']['phase_e'], [90, 180]))
            && (!isset($planets2[1]['phase']['1-7']) || !in_array($planets2[1]['phase']['1-7']['phase_e'], [90, 180]))
            && $ret < 30
        )
        {
            $ret = 30;
        } elseif ($planets1[1]['in_sign_id'] % 4 == $planets2[1]['in_sign_id'] % 4 && $ret < 25)
        {
            $ret = 25;
        }

        return $ret;
    }

    /**
     * 愉悦指数
     * 基数=木星正指数+金星正指数+月亮正指数-金星负指数-月亮负指数
     * @return int
     */
    protected function getTheHappyScore()
    {
        $ret = 0;
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];
        $ret += $coef1['obverse'][5] + $coef2['obverse'][5] + $coef1['obverse'][3] + $coef2['obverse'][3]
            + $coef1['obverse'][1] + $coef2['obverse'][1]
            - $coef1['versa'][1] - $coef2['versa'][1] - $coef1['versa'][3] - $coef2['versa'][3];

        return $ret;
    }

    /**
     * 缘分指数
     * #####基数=（A、M、日、月、金、水、火的正指数合+北交点正指数*3）*和谐度百分比
     * 基数=A、M的正指数合+北交点正指数*2
     * @return float|int
     */
    protected function getTheProbTobeLover()
    {
        $ret = 0;
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];
//        $hc = $this->getTheHarmoniousAndConflict($data1, $data2);
        $ret += (
            $coef1['obverse'][ASC] + $coef2['obverse'][ASC]
            + $coef1['obverse'][MC] + $coef2['obverse'][MC]
            + ($coef1['obverse'][12] + $coef2['obverse'][12]) * 2
        );

        return $ret;
    }

    /**
     * 获取行星和谐度和冲突度
     */
    protected function getTheHarmoniousAndConflict()
    {
        $ret = [0, 0];// 和谐度|冲突度
        $coef1 = $this->data['coef1'];
        $coef2 = $this->data['coef2'];
        $planets1 = $this->option['data1'][1]['planets'];
        $planets2 = $this->option['data2'][1]['planets'];
        $total = $coef1['obverse'][0] + $coef1['versa'][0] + $coef2['obverse'][0] + $coef2['versa'][0]
            + $coef1['obverse'][1] + $coef1['versa'][1] + $coef2['obverse'][1] + $coef2['versa'][1]
            + $coef1['obverse'][2] + $coef1['versa'][2] + $coef2['obverse'][2] + $coef2['versa'][2]
            + $coef1['obverse'][3] + $coef1['versa'][3] + $coef2['obverse'][3] + $coef2['versa'][3]
            + $coef1['obverse'][4] + $coef1['versa'][4] + $coef2['obverse'][4] + $coef2['versa'][4]
            + $coef1['obverse'][ASC] + $coef1['versa'][ASC] + $coef2['obverse'][ASC] + $coef2['versa'][ASC]
            + $coef1['obverse'][MC] + $coef1['versa'][MC] + $coef2['obverse'][MC] + $coef2['versa'][MC];

        foreach ($planets2 as $i => $pl)
        {
            if ($i < 5 || $i == ASC || $i == MC)
            {
                $sum = $coef1['obverse'][$i] + $coef1['versa'][$i] + $coef2['obverse'][$i] + $coef2['versa'][$i];
                // 20190104 Division by zero问题处理
                if ($sum == 0 || $total == 0 || $this->param['base'][$i] == 0) break;

                $a = $sum / $total * 7 * $this->param['base'][$i];
                if ($sum)
                {
                    $scale1 = ($coef1['obverse'][$i] + $coef2['obverse'][$i]) / $sum;
                    $scale2 = ($coef1['versa'][$i] + $coef2['versa'][$i]) / $sum;

                    $ret[0] += $scale1 * $a;
                    $ret[1] += $scale2 * $a;
                }

            }
        }

        $d = [0, 0, 0, 0, 0, 0, 0, 0];
        for ($k = 0; $k < 10; $k++)
        {
            if (!empty($planets1[$k]['phase']))
            {
//                $is_main_060120_1 = false;
                foreach ($planets1[$k]['phase'] as $phase)
                {
                    $a = $b = $c = 0;
                    if ($phase['phase_orb'] < 0.5) $phase_o = 1;
                    elseif ($phase['phase_orb'] < 1.5) $phase_o = 0.9;
                    elseif ($phase['phase_orb'] < 3) $phase_o = 0.85;
                    elseif ($phase['phase_orb'] <= 5) $phase_o = 0.8;
                    else $phase_o = 0.75;

                    if (in_array($k, [7, 8, 9]) || in_array($phase['id'], [7, 8, 9]))
                    {
                        if ($phase['phase_orb'] < 0.5) $phase_o = 1;
                        elseif ($phase['phase_orb'] < 1) $phase_o = 0.9;
                        elseif ($phase['phase_orb'] < 2) $phase_o = 0.7;
                        elseif ($phase['phase_orb'] <= 3) $phase_o = 0.4;
                        else $phase_o = 0.1;
                    }
                    // 凶星刑冲合主星
                    if ($k < 5 && in_array($phase['id'], [4, 6, 7, 8, 9]))
                    {
                        $infortune = [4 => 7, 6 => 15, 7 => 3, 8 => 2, 9 => 2];
                        $main = [10, 15, 7, 8, 5];
                        $phase_base = [0 => 0.2, 90 => 0.7, 180 => 0.4];
//                        if (in_array($phase['id'], [0, 1, 3, 5]) && $phase['phase_orb'] <= 2 && in_array($phase['phase_e'], [0, 60, 120]))
//                        {
//                            $is_main_060120_1 = true;
//                        }
                        if (in_array($phase['phase_e'], [0, 90, 180]))
                        {
                            $a = $infortune[$phase['id']];
                            $b = $main[$k];
                            $c = $phase_base[$phase['phase_e']];
                            if ($k == $this->option['data1'][1]['houses'][1]['protect_id']
                                || $k == $this->option['data1'][1]['houses'][1]['protect_ancient_id'])
                            {
                                $b += 3;
                            }
                            $d[0] += ($a + $b) * $c * $phase_o;
                        }
                    } // 凶星刑冲合轴点
                    elseif (in_array($k, [4, 6, 7, 8, 9]) && in_array($phase['id'], [ASC, MC]))
                    {
                        $infortune = [4 => 12, 6 => 8, 7 => 8, 8 => 5, 9 => 3];
                        $pivot = [ASC => 15, MC => 14];
                        $phase_base = [0 => 0.8, 90 => 0.2, 180 => 0.6];
                        if (in_array($phase['phase_e'], [0, 90, 180]))
                        {
                            $a = $infortune[$k];
                            $b = $pivot[$phase['id']];
                            $c = $phase_base[$phase['phase_e']];
                            $d[1] += ($a + $b) * $c * $phase_o;
                        }
                    } // 主星相互刑冲
                    elseif ($k < 4 && in_array($phase['id'], [0, 1, 2, 3]))
                    {
                        $main = [14, 16, 7, 10];
                        $phase_base = [90 => 0.35, 180 => 0.1];
                        if (in_array($phase['phase_e'], [90, 180]))
                        {
                            $a = $main[$k];
                            $b = $main[$phase['id']];
                            $c = $phase_base[$phase['phase_e']];
                            $d[2] += ($a + $b) * $c * $phase_o;
                        }
                    } // 主星刑四轴
                    elseif ($k < 4 && in_array($phase['id'], [ASC, MC]))
                    {
                        $main = [14, 16, 7, 10];
                        $pivot = [ASC => 16, MC => 15];
                        $phase_base = [90 => 0.2];
                        if ($phase['phase_e'] == 90)
                        {
                            $a = $main[$k];
                            $b = $pivot[$phase['id']];
                            $c = $phase_base[$phase['phase_e']];
                            $d[3] += ($a + $b) * $c * $phase_o;
                        }
                    }
                }
//                if ($is_main_060120_1 === false)
//                {
////                    $d[0] *= 1.3;
//                }
            }
//            if(!empty($planets2[$k]['phase']))
//            {
//                $is_main_060120_2 = false;
//                foreach ($planets2[$k]['phase'] as $phase)
//                {
//                    $a=$b=$c=0;
//                    if($phase['phase_orb'] < 0.5) $phase_o = 1;
//                    elseif($phase['phase_orb'] < 1.5) $phase_o = 0.9;
//                    elseif($phase['phase_orb'] < 3) $phase_o = 0.85;
//                    elseif($phase['phase_orb'] <= 5) $phase_o = 0.8;
//                    elseif($phase['phase_orb'] > 5) $phase_o = 0.75;
//
//                    if(in_array($k,[7,8,9]) || in_array($phase['id'],[7,8,9]))
//                    {
//                        if($phase['phase_orb'] < 0.5) $phase_o = 1;
//                        elseif($phase['phase_orb'] < 1) $phase_o = 0.9;
//                        elseif($phase['phase_orb'] < 2) $phase_o = 0.7;
//                        elseif($phase['phase_orb'] <= 3) $phase_o = 0.4;
//                        elseif($phase['phase_orb'] > 3) $phase_o = 0.1;
//                    }
//                    // 凶星刑冲合主星
//                    if($k < 5 && in_array($phase['id'],[4,6,7,8,9]))
//                    {
//                        $infortune = [4=>7,6=>15,7=>3,8=>2,9=>2];
//                        $main = [10,15,7,8,5];
//                        $phase_base = [0=>0.2,90=>0.7,180=>0.4];
//                        if(in_array($phase['id'],[0,1,3,5]) && $phase['phase_orb'] <= 2 && in_array($phase['phase_e'],[0,60,120]))
//                        {
//                            $is_main_060120_2 = true;
//                        }
//                        if(in_array($phase['phase_e'],[0,90,180]))
//                        {
//                            $a = $infortune[$phase['id']];
//                            $b = $main[$k];
//                            $c = $phase_base[$phase['phase_e']];
//                            if($k == $data1->details1['houses'][1]['protect_id']
//                                || $k == $data1->details1['houses'][1]['protect_ancient_id'])
//                            {
//                                $b += 3;
//                            }
//                            $d[4] += ($a+$b)*$c*$phase_o;
//                        }
//                    }
//                    // 凶星刑冲合轴点
//                    elseif(in_array($k,[4,6,7,8,9]) && in_array($phase['id'],[ASC,MC]))
//                    {
//                        $infortune = [4=>12,6=>8,7=>8,8=>5,9=>3];
//                        $pivot = [ASC=>15,MC=>14];
//                        $phase_base = [0=>0.8,90=>0.2,180=>0.6];
//                        if(in_array($phase['phase_e'],[0,90,180]))
//                        {
//                            $a = $infortune[$k];
//                            $b = $pivot[$phase['id']];
//                            $c = $phase_base[$phase['phase_e']];
//                            $d[5] += ($a+$b)*$c*$phase_o;
//                        }
//                    }
//                    // 主星相互刑冲
//                    elseif($k < 4 && in_array($phase['id'],[0,1,2,3]))
//                    {
//                        $main = [14,16,7,10];
//                        $phase_base = [90=>0.35,180=>0.1];
//                        if(in_array($phase['phase_e'],[90,180]))
//                        {
//                            $a = $main[$k];
//                            $b = $main[$phase['id']];
//                            $c = $phase_base[$phase['phase_e']];
//                            $d[6] += ($a+$b)*$c*$phase_o;
//                        }
//                    }
//                    // 主星刑四轴
//                    elseif($k < 4 && in_array($phase['id'],[ASC,MC]))
//                    {
//                        $main = [14,16,7,10];
//                        $pivot = [ASC=>16,MC=>15];
//                        $phase_base = [90=>0.2];
//                        if($phase['phase_e'] == 90)
//                        {
//                            $a = $main[$k];
//                            $b = $pivot[$phase['id']];
//                            $c = $phase_base[$phase['phase_e']];
//                            $d[7] += ($a+$b)*$c*$phase_o;
//                        }
//                    }
//                }
//                if($is_main_060120_2 === false)
//                {
////                    $d[4] *= 1.3;
//                }
//            }
        }


        $ts = array_sum($ret);
        if ($ts === 0)
        {
            return [50, 50];
        }
        if ($ret[0] === 0)
        {
            $harmonious = 0;
        } else
        {
            $harmonious = round($ret[0] / $ts * 100);
        }
        if ($ret[1] === 0)
        {
            $conflict = 0;
        } else
        {
            $conflict = round($ret[1] / $ts * 100);
        }

        $result = [$harmonious, $conflict];

        $this->data['harmoniousConflict'] = $result;
        return;
    }

    /**
     * 获取宫位增益能量和破坏能量
     * @return array
     */
    protected function getTheHousePower()
    {
        $planets1 = $this->option['data1'][1]['planets'];
        $planets1_2 = $this->option['data1'][0]['planets'];
        $planets2 = $this->option['data2'][1]['planets'];
        $planets2_2 = $this->option['data2'][0]['planets'];
        $good = [0 => 20, 1 => 20, 2 => 9, 3 => 12, 4 => 10, 5 => 12, 6 => 2, 7 => 2, 8 => 2, 9 => 2, 12 => 3];// 增益能量
        $bad = [4 => 4, 6 => 6, 7 => 1, 8 => 2, 9 => 1];// 破坏能量
        $hg = [1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0];// 宫位增益能量
        $hb = [1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, 11 => 0, 12 => 0];// 宫位破坏能量
        // 日月水金火木土天海冥
        for ($i = 0; $i < 13; $i++)
        {
            if ($i > 9 && $i < 12) continue;
            if (!isset($planets1[$i])) continue;
            $planet1 = $planets1[$i];// A在B A
            $planet2 = $planets2[$i];// B在A B

            if (!empty($planet1['phase']))
            {
                $phase0_num = 0;
                $first = 8;
                $second = 8;
                $h_f = NULL;
                $h_s = NULL;
                $h = $h2 = NULL;
                foreach ($planet1['phase'] as $phase)
                {
                    if (!in_array($phase['id'], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, ASC, MC])) continue;
                    if ($phase['id'] == ASC)
                    {
                        // 合上升
                        if ($phase['phase_e'] == 0)
                        {
                            if (isset($good[$i])) $hg[1] += $good[$i] + 15;
                            if (isset($bad[$i])) $hb[1] += $bad[$i] + 15;
                        } // 合下降
                        elseif ($phase['phase_e'] == 180)
                        {
                            if (isset($good[$i])) $hg[7] += $good[$i] + 15;
                            if (isset($bad[$i])) $hb[7] += $bad[$i] + 15;
                        }
                    } elseif ($phase['id'] == MC)
                    {
                        // 合天顶
                        if ($phase['phase_e'] == 0)
                        {
                            if (isset($good[$i])) $hg[10] += $good[$i] + 15;
                            if (isset($bad[$i])) $hb[10] += $bad[$i] + 15;
                        } // 合天底
                        elseif ($phase['phase_e'] == 180)
                        {
                            if (isset($good[$i])) $hg[4] += $good[$i] + 15;
                            if (isset($bad[$i])) $hb[4] += $bad[$i] + 15;
                        }
                    } else
                    {
                        // 容许系数
                        $_orb = $phase['phase_orb'];
                        if ($_orb < 0.5) $o = 1;
                        elseif ($_orb < 1.5) $o = 0.9;
                        elseif ($_orb < 3) $o = 0.85;
                        elseif ($_orb <= 5) $o = 0.8;
                        else $o = 0.75;
                        $h = $planet1['in_house_id'];// 外盘星体落在底盘中的宫位
                        $h2 = $planets1_2[$phase['id']]['in_house_id'];// 底盘星体所在宫位
                        // 若与内盘某星成合相，该宫位增益能量或破坏能量+相应的外盘星体基本能量*容许系数
                        // （多颗星则以最紧密的相位计算，再加上次紧密的相位的一半）
                        if ($phase['phase_e'] == 0)
                        {
                            $phase0_num++;
                            if ($phase0_num == 0)
                            {
                                $first = $o;
                                $h_f = $h2;
                            } elseif ($o < $first)
                            {
                                $second = $first;
                                $first = $o;
                                $h_s = $h_f;
                                $h_f = $h2;
                            } elseif ($o > $first && $o < $second)
                            {
                                $second = $o;
                                $h_s = $h2;
                            }
                        }
                        // 若与内盘星体成六分相，检测成相星体所在宫位，该宫位增益能量+相应的外盘星体基本能量*容许系数*0.5（无破坏）
                        // 外盘星体所在宫位的增益能量+成相星体的基本能量*容许系数*0.5
                        elseif ($phase['phase_e'] == 60)
                        {
                            if (isset($good[$i])) $hg[$h2] += $good[$i] * $o * 0.5;
                            if (isset($good[$phase['id']])) $hg[$h] += $good[$phase['id']] * $o * 0.5;
                        }
                        // 若与内盘星体成四分相，分两种情况计算
                        // 1、	若外盘星体为火土天海冥（对双方都是天海冥的相位不予计算），对内盘成相星体宫位造成的破坏为
                        //  外盘星基本破坏能量*容许系数*2
                        // 2、	若外盘星体为日月水金木，对内盘成相星体宫位造成的
                        // 破坏为 外盘星基本增益能量*容许系数*0.3；
                        // 增益为 外盘星基本增益能量*容许系数*0.1
                        // 【对外盘星所在宫位的破坏，也按上述步骤计算】
                        elseif ($phase['phase_e'] == 90)
                        {
                            if (in_array($i, [4, 6, 7, 8, 9]))
                            {
                                if (in_array($i, [7, 8, 9]) && in_array($phase['id'], [7, 8, 9])) continue;
                                if (isset($bad[$i])) $hb[$h2] += $bad[$i] * $o * 2;
                            } elseif (in_array($i, [0, 1, 2, 3, 5]))
                            {
                                if (isset($good[$phase['id']])) $hg[$h2] += $good[$phase['id']] * $o * 0.1;
                                if (isset($good[$phase['id']])) $hb[$h2] += $good[$phase['id']] * $o * 0.3;
                            }
                        }
                        // 若与内盘星体成三分相，检测成相星体所在宫位，该宫位增益能量+相应的外盘星体基本能量*容许系数*0.6（无破坏）
                        // 外盘星体所在宫位的增益能量+成相星体的基本能量*容许系数*0.6
                        elseif ($phase['phase_e'] == 120)
                        {
                            if (isset($good[$i])) $hg[$h2] += $good[$i] * $o * 0.6;
                            if (isset($good[$phase['id']])) $hg[$h] += $good[$phase['id']] * $o * 0.6;
                        }
                        // 若与内盘星体成对分相，分两种情况计算
                        // 1、	若外盘星体为火土天海冥（对双方都是天海冥的相位不予计算），对内盘成相星体宫位造成的破坏为
                        // 外盘星基本破坏能量*容许系数*1.5
                        // 2、	若外盘星体为日月水金木，对内盘成相星体宫位造成的
                        // 破坏为 外盘星基本增益能量*容许系数*0.25；
                        // 增益为 外盘星基本增益能量*容许系数*0.6
                        //【对外盘星所在宫位的破坏，也按上述步骤计算】
                        elseif ($phase['phase_e'] == 180)
                        {
                            if (in_array($i, [4, 6, 7, 8, 9]))
                            {
                                if (in_array($i, [7, 8, 9]) && in_array($phase['id'], [7, 8, 9])) continue;
                                if (isset($bad[$i])) $hb[$h2] += $bad[$i] * $o * 2;
                            } elseif (in_array($i, [0, 1, 2, 3, 5]))
                            {
                                if (isset($good[$phase['id']])) $hg[$h2] += $good[$phase['id']] * $o * 0.6;
                                if (isset($good[$phase['id']])) $hb[$h2] += $good[$phase['id']] * $o * 0.25;
                            }
                        }
                    }
                }
                if ($phase0_num == 1)
                {
                    if (isset($good[$i])) $hg[$h2] += $good[$i] * $first;
                    if (isset($bad[$i])) $hb[$h2] += $bad[$i] * $first;
                } elseif ($phase0_num > 1)
                {
                    if (isset($good[$i])) $hg[$h2] += $good[$i] * $first + $good[$i] * $second * 0.5;
                    if (isset($bad[$i])) $hb[$h2] += $bad[$i] * $first + $bad[$i] * $second * 0.5;
                }
            }

            if (!empty($planet2['phase']))
            {
                $phase0_num = 0;
                $first = 8;
                $second = 8;
                $h_f = NULL;
                $h_s = NULL;
                $h = $h2 = NULL;
                foreach ($planet2['phase'] as $phase)
                {
                    if (!in_array($phase['id'], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, ASC, MC])) continue;
                    if ($phase['id'] == ASC)
                    {
                        // 合上升
                        if ($phase['phase_e'] == 0)
                        {
                            if (isset($good[$i])) $hg[1] += $good[$i] + 15;
                            if (isset($bad[$i])) $hb[1] += $bad[$i] + 15;
                        } // 合下降
                        elseif ($phase['phase_e'] == 180)
                        {
                            if (isset($good[$i])) $hg[7] += $good[$i] + 15;
                            if (isset($bad[$i])) $hb[7] += $bad[$i] + 15;
                        }
                    } elseif ($phase['id'] == MC)
                    {
                        // 合天顶
                        if ($phase['phase_e'] == 0)
                        {
                            if (isset($good[$i])) $hg[10] += $good[$i] + 15;
                            if (isset($bad[$i])) $hb[10] += $bad[$i] + 15;
                        } // 合天底
                        elseif ($phase['phase_e'] == 180)
                        {
                            if (isset($good[$i])) $hg[4] += $good[$i] + 15;
                            if (isset($bad[$i])) $hb[4] += $bad[$i] + 15;
                        }
                    } else
                    {
                        // 容许系数
                        $_orb = $phase['phase_orb'];
                        if ($_orb < 0.5) $o = 1;
                        elseif ($_orb < 1.5) $o = 0.9;
                        elseif ($_orb < 3) $o = 0.85;
                        elseif ($_orb <= 5) $o = 0.8;
                        else $o = 0.75;
                        $h = $planet2['in_house_id'];// 外盘星体落在底盘中的宫位
                        $h2 = $planets2_2[$phase['id']]['in_house_id'];// 底盘星体所在宫位
                        // 若与内盘某星成合相，该宫位增益能量或破坏能量+相应的外盘星体基本能量*容许系数
                        // （多颗星则以最紧密的相位计算，再加上次紧密的相位的一半）
                        if ($phase['phase_e'] == 0)
                        {
                            $phase0_num++;
                            if ($phase0_num == 0)
                            {
                                $first = $o;
                                $h_f = $h2;
                            } elseif ($o < $first)
                            {
                                $second = $first;
                                $first = $o;
                                $h_s = $h_f;
                                $h_f = $h2;
                            } elseif ($o > $first && $o < $second)
                            {
                                $second = $o;
                                $h_s = $h2;
                            }
                        }
                        // 若与内盘星体成六分相，检测成相星体所在宫位，该宫位增益能量+相应的外盘星体基本能量*容许系数*0.5（无破坏）
                        // 外盘星体所在宫位的增益能量+成相星体的基本能量*容许系数*0.5
                        elseif ($phase['phase_e'] == 60)
                        {
                            if (isset($good[$i])) $hg[$h2] += $good[$i] * $o * 0.5;
                            if (isset($good[$phase['id']])) $hg[$h] += $good[$phase['id']] * $o * 0.5;
                        }
                        // 若与内盘星体成四分相，分两种情况计算
                        // 1、	若外盘星体为火土天海冥（对双方都是天海冥的相位不予计算），对内盘成相星体宫位造成的破坏为
                        //  外盘星基本破坏能量*容许系数*2
                        // 2、	若外盘星体为日月水金木，对内盘成相星体宫位造成的
                        // 破坏为 外盘星基本增益能量*容许系数*0.3；
                        // 增益为 外盘星基本增益能量*容许系数*0.1
                        // 【对外盘星所在宫位的破坏，也按上述步骤计算】
                        elseif ($phase['phase_e'] == 90)
                        {
                            if (in_array($i, [4, 6, 7, 8, 9]))
                            {
                                if (in_array($i, [7, 8, 9]) && in_array($phase['id'], [7, 8, 9])) continue;
                                if (isset($bad[$i])) $hb[$h2] += $bad[$i] * $o * 2;
                            } elseif (in_array($i, [0, 1, 2, 3, 5]))
                            {
                                if (isset($good[$phase['id']])) $hg[$h2] += $good[$phase['id']] * $o * 0.1;
                                if (isset($good[$phase['id']])) $hb[$h2] += $good[$phase['id']] * $o * 0.3;
                            }
                        }
                        // 若与内盘星体成三分相，检测成相星体所在宫位，该宫位增益能量+相应的外盘星体基本能量*容许系数*0.6（无破坏）
                        // 外盘星体所在宫位的增益能量+成相星体的基本能量*容许系数*0.6
                        elseif ($phase['phase_e'] == 120)
                        {
                            if (isset($good[$i])) $hg[$h2] += $good[$i] * $o * 0.6;
                            if (isset($good[$phase['id']])) $hg[$h] += $good[$phase['id']] * $o * 0.6;
                        }
                        // 若与内盘星体成对分相，分两种情况计算
                        // 1、	若外盘星体为火土天海冥（对双方都是天海冥的相位不予计算），对内盘成相星体宫位造成的破坏为
                        // 外盘星基本破坏能量*容许系数*1.5
                        // 2、	若外盘星体为日月水金木，对内盘成相星体宫位造成的
                        // 破坏为 外盘星基本增益能量*容许系数*0.25；
                        // 增益为 外盘星基本增益能量*容许系数*0.6
                        //【对外盘星所在宫位的破坏，也按上述步骤计算】
                        elseif ($phase['phase_e'] == 180)
                        {
                            if (in_array($i, [4, 6, 7, 8, 9]))
                            {
                                if (in_array($i, [7, 8, 9]) && in_array($phase['id'], [7, 8, 9])) continue;
                                if (isset($bad[$i])) $hb[$h2] += $bad[$i] * $o * 2;
                            } elseif (in_array($i, [0, 1, 2, 3, 5]))
                            {
                                if (isset($good[$phase['id']])) $hg[$h2] += $good[$phase['id']] * $o * 0.6;
                                if (isset($good[$phase['id']])) $hb[$h2] += $good[$phase['id']] * $o * 0.25;
                            }
                        }
                    }
                }
                if ($phase0_num == 1)
                {
                    if (isset($good[$i])) $hg[$h2] += $good[$i] * $first;
                    if (isset($bad[$i])) $hb[$h2] += $bad[$i] * $first;
                } elseif ($phase0_num > 1)
                {
                    if (isset($good[$i])) $hg[$h2] += $good[$i] * $first + $good[$i] * $second * 0.5;
                    if (isset($bad[$i])) $hb[$h2] += $bad[$i] * $first + $bad[$i] * $second * 0.5;
                }
            }
        }
        return [$hg, $hb];
    }

    /**
     * 获取2024版合盘结果
     * @param $record1 array 档案1
     * @param $record2 array 档案2
     * @param $rel int 合盘关系类型 2=>旧普通合盘 3=>明星合盘 5=>名人合盘 7=>大众合盘 8=>恋爱合盘 9=>婚姻合盘 10=>事业合盘 11=>朋友合盘
     *  0 => 星座合盘（rid1 档案, rid2 星座ID）
     *  8 => 恋爱关系
     *  9 => 婚姻关系
     *  10 => 事业关系
     *  11 => 朋友关系
     */
    public function getData2024($record1 = [], $record2 = [], $rel = 0)
    {
        try
        {
            $score1 = $this->getNewScoreList($rel, [$record1, $record2]);
            $score2 = $this->getNewScoreList($rel, [$record2, $record1]);
        }
        catch (\Exception $e)
        {
            Log::error('合盘2024计算失败:' . $e->getMessage() . '【' . $e->getFile() . $e->getLine() . '】');
            $score1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50];
            $score2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50];
        }

        $score = [];
        $count = count($score1);
        foreach ($score1 as $k1 => $v1)
        {
            // 六项潜力 四项预判
            if ($k1 < $count - 1)
            {
                $score[$k1] = ($score1[$k1] + $score2[$k1]) / 2;
            } // 比较
            else
            {
                $total = $score1[$k1] + $score2[$k1];
                if ($total > 0)
                {
                    $score[$k1] = (int)round($score1[$k1] / $total * 100);
                    $score[$k1 + 1] = (int)round($score2[$k1] / $total * 100);
                } else
                {
                    $score[$k1] = 50;
                    $score[$k1 + 1] = 50;
                }
            }
        }

        $res = $this->getDataText($rel, $score, [$record1, $record2]);
        return $res;
    }

    protected function getNewScoreList($rel, $records): array
    {
        list($recode1, $recode2) = $records;
        $sex1 = (int)$recode1['type'];

        $settting1 = [
            'natal' => [
                'asp_orb_all' => [0 => 8, 60 => 6, 90 => 7, 120 => 7, 180 => 7, 30 => 1, 150 => 2, 45 => 2, 135 => 2, 72 => 2, 144 => 2],
                'asps_display' => [0, 60, 90, 120, 180],
                'planets_display' => '111111111100100001111',
                'planet_orb_all' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                'h_sys' => 'p',
            ],
            'synastry' => [
                'asp_orb_all' => [0 => 6, 60 => 4, 90 => 6, 120 => 6, 180 => 6, 30 => 1, 150 => 2, 45 => 2, 135 => 2, 72 => 2, 144 => 2],
                'asps_display' => [0, 60, 90, 120, 180],
                'planets_display' => '111111111100100001111',
                'planet_orb_all' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                'h_sys' => 'p',
            ],
            'composite' => [
                'asp_orb_all' => [0 => 8, 60 => 6, 90 => 7, 120 => 7, 180 => 7, 30 => 1, 150 => 2, 45 => 2, 135 => 2, 72 => 2, 144 => 2],
                'asps_display' => [0, 60, 90, 120, 180],
                'planets_display' => '111111111100000001111',
                'planet_orb_all' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                'h_sys' => 'p',
            ],
            'davison' => [
                'asp_orb_all' => [0 => 8, 60 => 6, 90 => 7, 120 => 7, 180 => 7, 30 => 1, 150 => 2, 45 => 2, 135 => 2, 72 => 2, 144 => 2],
                'asps_display' => [0, 60, 90, 120, 180],
                'planets_display' => '111111111100000001111',
                'planet_orb_all' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                'h_sys' => 'p',
            ],
        ];

        $Astrolog = Astrolog::getInstance()
            ->setExecPrefix(config('astrolog.prefix'))
            ->setUserSetting($settting1)
            ->setIsAstrolabe(false)
            ->setGetDatas(['synastry', 'composite', 'davison']);

        $synastry = $Astrolog
            ->setRecode1($recode1)
            ->setRecode2($recode2)
            ->getAstroDatas()
            ->getDatas('synastry');

        $composite = $Astrolog->getDatas('composite');
        $davison = $Astrolog->getDatas('davison');
        // 对方的本命盘
        $natal2 = $Astrolog->setRecode1($recode2)->setGetDatas(['natal'])->getAstroDatas()->getDatas('natal');

        switch ($rel)
        {
            case 7:
                $score1 = 0;
                $score2 = 0;
                $score3 = 0;
                $score4 = 0;
                $score5 = 0;
                $score6 = 0;
                // 大众合盘 需要计算相处预判 初识、交往中、长期交往、内心感受
                $confs7 = [
                    'pids' => [0, 17],
                    'signs' => [
                        '17-1' => 20,
                        '17-2' => 80,
                        '17-3' => 60,
                        '17-4' => 80,
                        '17-5' => 100,
                        '17-6' => 60,
                        '17-7' => 80,
                        '17-8' => 20,
                        '17-9' => 100,
                        '17-10' => 20,
                        '17-11' => 20,
                        '17-12' => 100,

                        '0-1' => 80,
                        '0-2' => 60,
                        '0-3' => 80,
                        '0-4' => 100,
                        '0-5' => 80,
                        '0-6' => 60,
                        '0-7' => 60,
                        '0-8' => 20,
                        '0-9' => 80,
                        '0-10' => 40,
                        '0-11' => 20,
                        '0-12' => 80,
                    ],
                ];
                $score7 = $this->getXcyp($composite, $confs7);
                $confs8 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'houses' => [
                        '0-1' => 60,
                        '0-2' => 60,
                        '0-3' => 80,
                        '0-4' => 100,
                        '0-5' => 80,
                        '0-6' => 40,
                        '0-7' => 100,
                        '0-8' => 40,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 80,
                        '0-12' => 40,

                        '1-1' => 40,
                        '1-2' => 40,
                        '1-3' => 80,
                        '1-4' => 100,
                        '1-5' => 80,
                        '1-6' => 40,
                        '1-7' => 100,
                        '1-8' => 40,
                        '1-9' => 80,
                        '1-10' => 80,
                        '1-11' => 80,
                        '1-12' => 40,

                        '2-1' => 40,
                        '2-2' => 60,
                        '2-3' => 100,
                        '2-4' => 100,
                        '2-5' => 80,
                        '2-6' => 40,
                        '2-7' => 100,
                        '2-8' => 40,
                        '2-9' => 80,
                        '2-10' => 60,
                        '2-11' => 80,
                        '2-12' => 40,

                        '3-1' => 60,
                        '3-2' => 60,
                        '3-3' => 80,
                        '3-4' => 100,
                        '3-5' => 80,
                        '3-6' => 40,
                        '3-7' => 100,
                        '3-8' => 40,
                        '3-9' => 80,
                        '3-10' => 60,
                        '3-11' => 80,
                        '3-12' => 40,

                        '4-1' => 60,
                        '4-2' => 60,
                        '4-3' => 80,
                        '4-4' => 80,
                        '4-5' => 100,
                        '4-6' => 40,
                        '4-7' => 100,
                        '4-8' => 40,
                        '4-9' => 80,
                        '4-10' => 80,
                        '4-11' => 80,
                        '4-12' => 40,
                    ],
                ];
                $score8 = $this->getXcyp($composite, $confs8);
                $confs9 = [
                    'pids' => [19, 1],
                    'signs' => [
                        '19-1' => 20,
                        '19-2' => 80,
                        '19-3' => 60,
                        '19-4' => 80,
                        '19-5' => 100,
                        '19-6' => 60,
                        '19-7' => 80,
                        '19-8' => 20,
                        '19-9' => 100,
                        '19-10' => 20,
                        '19-11' => 20,
                        '19-12' => 100,

                        '1-1' => 20,
                        '1-2' => 80,
                        '1-3' => 80,
                        '1-4' => 100,
                        '1-5' => 60,
                        '1-6' => 40,
                        '1-7' => 100,
                        '1-8' => 20,
                        '1-9' => 60,
                        '1-10' => 40,
                        '1-11' => 60,
                        '1-12' => 60,
                    ],
                ];
                $score9 = $this->getXcyp($composite, $confs9);
                $confs10 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'signs' => [
                        '0-1' => 100,
                        '0-2' => 80,
                        '0-3' => 60,
                        '0-4' => 40,
                        '0-5' => 100,
                        '0-6' => 40,
                        '0-7' => 20,
                        '0-8' => 40,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 20,
                        '0-12' => 60,

                        '1-1' => 40,
                        '1-2' => 100,
                        '1-3' => 60,
                        '1-4' => 100,
                        '1-5' => 60,
                        '1-6' => 40,
                        '1-7' => 40,
                        '1-8' => 20,
                        '1-9' => 80,
                        '1-10' => 20,
                        '1-11' => 20,
                        '1-12' => 80,

                        '2-1' => 60,
                        '2-2' => 60,
                        '2-3' => 100,
                        '2-4' => 60,
                        '2-5' => 20,
                        '2-6' => 100,
                        '2-7' => 60,
                        '2-8' => 60,
                        '2-9' => 40,
                        '2-10' => 60,
                        '2-11' => 80,
                        '2-12' => 40,

                        '3-1' => 40,
                        '3-2' => 100,
                        '3-3' => 60,
                        '3-4' => 60,
                        '3-5' => 60,
                        '3-6' => 20,
                        '3-7' => 100,
                        '3-8' => 40,
                        '3-9' => 60,
                        '3-10' => 60,
                        '3-11' => 60,
                        '3-12' => 80,

                        '4-1' => 100,
                        '4-2' => 40,
                        '4-3' => 60,
                        '4-4' => 20,
                        '4-5' => 100,
                        '4-6' => 40,
                        '4-7' => 40,
                        '4-8' => 100,
                        '4-9' => 80,
                        '4-10' => 80,
                        '4-11' => 20,
                        '4-12' => 60,
                    ],
                ];
                $score10 = $this->getXcyp($composite, $confs10);

                $score11 = 0;
                break;
            case 8:
                // 计算恋爱潜力指数 比较盘
                // 恋爱：尊重信任、支持理解、互相依赖、共同兴趣、沟通、亲密
                $confs1 = [
                    'first' => [
                        10 => 7,
                        7 => 6,
                        4 => 5,
                        1 => 4,
                        12 => 2,
                        8 => 1,
                    ],
                    'first_id' => [0, 2],
                    'first_base' => 3,
                    'phase' => [
                        '0-0-0' => 7,
                        '0-0-120' => 7,
                        '0-0-60' => 6,
                        '0-0-180' => 2,
                        '0-1-0' => 7,
                        '0-1-120' => 6,
                        '0-1-60' => 5,
                        '0-1-180' => 2,
                        '0-2-0' => 14, // 权重加倍（最好的情况）
                        '0-2-120' => 6,
                        '0-2-60' => 5,
                        '0-2-180' => 1,
                        '0-3-0' => 7,
                        '0-3-120' => 6,
                        '0-3-60' => 5,
                        '0-3-180' => 1,
                        '0-4-0' => 5,
                        '0-4-120' => 4,
                        '0-4-60' => 4,
                        '0-4-180' => 2,
                        '0-5-0' => 7,
                        '0-5-120' => 6,
                        '0-5-60' => 6,
                        '0-5-180' => 3,
                        '0-6-0' => 4,
                        '0-6-120' => 3,
                        '0-6-60' => 2,
                        '0-6-180' => 1,
                        '0-7-0' => 2,
                        '0-7-120' => 2,
                        '0-7-60' => 2,
                        '0-8-0' => 2,
                        '0-8-120' => 2,
                        '0-8-60' => 1,
                        '0-9-0' => 5,
                        '0-9-120' => 4,
                        '0-9-60' => 3,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时

                        '2-0-0' => 7,
                        '2-0-120' => 7,
                        '2-0-60' => 6,
                        '2-0-180' => 2,
                        '2-1-0' => 6,
                        '2-1-120' => 5,
                        '2-1-60' => 4,
                        '2-1-180' => 1,
                        '2-2-0' => 7,
                        '2-2-120' => 6,
                        '2-2-60' => 5,
                        '2-2-180' => 1,
                        '2-3-0' => 6,
                        '2-3-120' => 5,
                        '2-3-60' => 4,
                        '2-3-180' => 1,
                        '2-4-0' => 5,
                        '2-4-120' => 4,
                        '2-4-60' => 3,
                        '2-4-180' => 1,
                        '2-5-0' => 14, // 权重加倍（最好的情况）
                        '2-5-120' => 6,
                        '2-5-60' => 5,
                        '2-5-180' => 2,
                        '2-6-0' => 5,
                        '2-6-120' => 3,
                        '2-6-60' => 2,
                        '2-6-180' => 1,
                        '2-7-0' => 3,
                        '2-7-120' => 2,
                        '2-7-60' => 1,
                        '2-7-180' => 1,
                        '2-8-0' => 2,
                        '2-8-120' => 2,
                        '2-8-60' => 1,
                        '2-8-180' => 1,
                        '2-9-0' => 3,
                        '2-9-120' => 2,
                        '2-9-60' => 1,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                // 计算尊重信任得分
                $score1 = $this->getQlzs($synastry, $confs1);
                // 计算支持理解
                $confs2 = [
                    'first' => [
                        9 => 7,
                        3 => 6,
                        10 => 5,
                        4 => 4,
                        8 => 2,
                        1 => 1,
                    ],
                    'first_id' => [1, 4],
                    'first_base' => 3,
                    'phase' => [
                        '1-0-0' => 7,
                        '1-0-120' => 7,
                        '1-0-60' => 6,
                        '1-0-180' => 2,
                        '1-1-0' => 7,
                        '1-1-120' => 7,
                        '1-1-60' => 5,
                        '1-1-180' => 2,
                        '1-2-0' => 14, // 权重加倍（最好的情况）
                        '1-2-120' => 6,
                        '1-2-60' => 5,
                        '1-2-180' => 1,
                        '1-3-0' => 7,
                        '1-3-120' => 6,
                        '1-3-60' => 5,
                        '1-3-180' => 1,
                        '1-4-0' => 7,
                        '1-4-120' => 6,
                        '1-4-60' => 5,
                        '1-4-180' => 2,
                        '1-5-0' => 7,
                        '1-5-120' => 7,
                        '1-5-60' => 6,
                        '1-5-180' => 3,
                        '1-6-0' => 3,
                        '1-6-120' => 2,
                        '1-6-60' => 2,
                        '1-6-180' => 1,
                        '1-7-0' => 5,
                        '1-7-120' => 4,
                        '1-7-60' => 3,
                        '1-7-180' => 2,
                        '1-8-0' => 6,
                        '1-8-120' => 5,
                        '1-8-60' => 4,
                        '1-8-180' => 1,
                        '1-9-0' => 5,
                        '1-9-120' => 4,
                        '1-9-60' => 3,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时

                        '4-0-0' => 14, // 权重加倍（最好的情况）
                        '4-0-120' => 6,
                        '4-0-60' => 5,
                        '4-0-180' => 2,
                        '4-1-0' => 7,
                        '4-1-120' => 6,
                        '4-1-60' => 5,
                        '4-1-180' => 2,
                        '4-2-0' => 7,
                        '4-2-120' => 6,
                        '4-2-60' => 5,
                        '4-2-180' => 2,
                        '4-3-0' => 7,
                        '4-3-120' => 6,
                        '4-3-60' => 5,
                        '4-3-180' => 1,
                        '4-4-0' => 7,
                        '4-4-120' => 6,
                        '4-4-60' => 5,
                        '4-4-180' => 2,
                        '4-5-0' => 7,
                        '4-5-120' => 7,
                        '4-5-60' => 6,
                        '4-5-180' => 2,
                        '4-6-0' => 4,
                        '4-6-120' => 3,
                        '4-6-60' => 2,
                        '4-6-180' => 1,
                        '4-7-0' => 5,
                        '4-7-120' => 4,
                        '4-7-60' => 3,
                        '4-7-180' => 1,
                        '4-8-0' => 2,
                        '4-8-120' => 2,
                        '4-8-60' => 1,
                        '4-8-180' => 1,
                        '4-9-0' => 5,
                        '4-9-120' => 4,
                        '4-9-60' => 3,
                        '4-9-180' => 1,
                        '4' => 2, // 与内环盘行星无相位及未提及的相位时
                        '4-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score2 = $this->getQlzs($synastry, $confs2);
                // 计算相互依赖
                $confs3 = [
                    'first' => [
                        4 => 7,
                        7 => 6,
                        3 => 5,
                        5 => 4,
                        12 => 2,
                        1 => 1,
                    ],
                    'first_id' => [0, 1],
                    'first_base' => 3,
                    'phase' => [
                        '1-0-0' => 7,
                        '1-0-120' => 7,
                        '1-0-60' => 6,
                        '1-0-180' => 2,
                        '1-1-0' => 14, // 权重加倍（最好的情况）
                        '1-1-120' => 7,
                        '1-1-60' => 5,
                        '1-1-180' => 2,
                        '1-2-0' => 6,
                        '1-2-120' => 5,
                        '1-2-60' => 4,
                        '1-2-180' => 1,
                        '1-3-0' => 6,
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 1,
                        '1-4-0' => 6,
                        '1-4-120' => 5,
                        '1-4-60' => 4,
                        '1-4-180' => 2,
                        '1-5-0' => 6,
                        '1-5-120' => 5,
                        '1-5-60' => 4,
                        '1-5-180' => 2,
                        '1-6-0' => 2,
                        '1-6-120' => 2,
                        '1-6-60' => 1,
                        '1-6-180' => 1,
                        '1-7-0' => 2,
                        '1-7-120' => 2,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 6,
                        '1-8-120' => 5,
                        '1-8-60' => 4,
                        '1-8-180' => 3,
                        '1-9-0' => 6,
                        '1-9-120' => 5,
                        '1-9-60' => 4,
                        '1-9-180' => 2,
                        '1' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时

                        '0-0-0' => 7,
                        '0-0-120' => 6,
                        '0-0-60' => 6,
                        '0-0-180' => 2,
                        '0-1-0' => 14, // 权重加倍（最好的情况）
                        '0-1-120' => 6,
                        '0-1-60' => 5,
                        '0-1-180' => 3,
                        '0-2-0' => 6,
                        '0-2-120' => 5,
                        '0-2-60' => 4,
                        '0-2-180' => 1,
                        '0-3-0' => 5,
                        '0-3-120' => 4,
                        '0-3-60' => 3,
                        '0-3-180' => 1,
                        '0-4-0' => 6,
                        '0-4-120' => 5,
                        '0-4-60' => 4,
                        '0-4-180' => 1,
                        '0-5-0' => 6,
                        '0-5-120' => 5,
                        '0-5-60' => 4,
                        '0-5-180' => 1,
                        '0-6-0' => 2,
                        '0-6-120' => 2,
                        '0-6-60' => 1,
                        '0-6-180' => 1,
                        '0-7-0' => 3,
                        '0-7-120' => 2,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 3,
                        '0-8-120' => 2,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 5,
                        '0-9-120' => 4,
                        '0-9-60' => 3,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score3 = $this->getQlzs($synastry, $confs3);
                // 计算共同兴趣
                $confs4 = [
                    'first' => [
                        5 => 7,
                        3 => 6,
                        7 => 5,
                        11 => 4,
                        12 => 2,
                        8 => 1
                    ],
                    'first_id' => [0, 3],
                    'first_base' => 3,
                    'phase' => [
                        '0-0-0' => 7,
                        '0-0-120' => 14, // 权重加倍（最好的情况）
                        '0-0-60' => 6,
                        '0-0-180' => 2,
                        '0-1-0' => 14, // 权重加倍（最好的情况）
                        '0-1-120' => 6,
                        '0-1-60' => 5,
                        '0-1-180' => 1,
                        '0-2-0' => 6,
                        '0-2-120' => 5,
                        '0-2-60' => 4,
                        '0-2-180' => 1,
                        '0-3-0' => 6,
                        '0-3-120' => 5,
                        '0-3-60' => 4,
                        '0-3-180' => 1,
                        '0-4-0' => 5,
                        '0-4-120' => 4,
                        '0-4-60' => 3,
                        '0-4-180' => 1,
                        '0-5-0' => 7,
                        '0-5-120' => 6,
                        '0-5-60' => 6,
                        '0-5-180' => 2,
                        '0-6-0' => 5,
                        '0-6-120' => 3,
                        '0-6-60' => 2,
                        '0-6-180' => 1,
                        '0-7-0' => 3,
                        '0-7-120' => 2,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 2,
                        '0-8-120' => 2,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 3,
                        '0-9-120' => 2,
                        '0-9-60' => 1,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时

                        '3-0-0' => 14, // 权重加倍（最好的情况）
                        '3-0-120' => 7,
                        '3-0-60' => 6,
                        '3-0-180' => 2,
                        '3-1-0' => 14, // 权重加倍（最好的情况）
                        '3-1-120' => 6,
                        '3-1-60' => 5,
                        '3-1-180' => 2,
                        '3-2-0' => 7,
                        '3-2-120' => 6,
                        '3-2-60' => 5,
                        '3-2-180' => 1,
                        '3-3-0' => 7,
                        '3-3-120' => 6,
                        '3-3-60' => 5,
                        '3-3-180' => 1,
                        '3-4-0' => 5,
                        '3-4-120' => 4,
                        '3-4-60' => 3,
                        '3-4-180' => 2,
                        '3-5-0' => 7,
                        '3-5-120' => 6,
                        '3-5-60' => 6,
                        '3-5-180' => 3,
                        '3-6-0' => 4,
                        '3-6-120' => 3,
                        '3-6-60' => 2,
                        '3-6-180' => 1,
                        '3-7-0' => 2,
                        '3-7-120' => 2,
                        '3-7-60' => 2,
                        '3-8-0' => 2,
                        '3-8-120' => 2,
                        '3-8-60' => 1,
                        '3-9-0' => 5,
                        '3-9-120' => 4,
                        '3-9-60' => 3,
                        '3-9-180' => 1,
                        '3' => 2, // 与内环盘行星无相位及未提及的相位时
                        '3-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score4 = $this->getQlzs($synastry, $confs4);
                // 计算沟通
                $confs5 = [
                    'first' => [
                        3 => 7,
                        9 => 6,
                        7 => 5,
                        4 => 4,
                        12 => 2,
                        8 => 1
                    ],
                    'first_id' => [2, 3],
                    'first_base' => 3,
                    'phase' => [
                        '2-0-0' => 14, // 权重加倍（最好的情况）
                        '2-0-120' => 7,
                        '2-0-60' => 6,
                        '2-0-180' => 2,
                        '2-1-0' => 14, // 权重加倍（最好的情况）
                        '2-1-120' => 6,
                        '2-1-60' => 5,
                        '2-1-180' => 2,
                        '2-2-0' => 7,
                        '2-2-120' => 6,
                        '2-2-60' => 5,
                        '2-2-180' => 1,
                        '2-3-0' => 7,
                        '2-3-120' => 6,
                        '2-3-60' => 5,
                        '2-3-180' => 1,
                        '2-4-0' => 5,
                        '2-4-120' => 4,
                        '2-4-60' => 4,
                        '2-4-180' => 2,
                        '2-5-0' => 7,
                        '2-5-120' => 6,
                        '2-5-60' => 6,
                        '2-5-180' => 3,
                        '2-6-0' => 4,
                        '2-6-120' => 3,
                        '2-6-60' => 2,
                        '2-6-180' => 1,
                        '2-7-0' => 2,
                        '2-7-120' => 2,
                        '2-7-60' => 2,
                        '2-8-0' => 2,
                        '2-8-120' => 2,
                        '2-8-60' => 1,
                        '2-9-0' => 5,
                        '2-9-120' => 4,
                        '2-9-60' => 3,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时

                        '3-0-0' => 6,
                        '3-0-120' => 5,
                        '3-0-60' => 4,
                        '3-0-180' => 2,
                        '3-1-0' => 14, // 权重加倍（最好的情况）
                        '3-1-120' => 6,
                        '3-1-60' => 5,
                        '3-1-180' => 1,
                        '3-2-0' => 7, // 权重加倍（最好的情况）
                        '3-2-120' => 6,
                        '3-2-60' => 5,
                        '3-2-180' => 1,
                        '3-3-0' => 6,
                        '3-3-120' => 5,
                        '3-3-60' => 4,
                        '3-3-180' => 1,
                        '3-4-0' => 5,
                        '3-4-120' => 4,
                        '3-4-60' => 3,
                        '3-4-180' => 1,
                        '3-5-0' => 7,
                        '3-5-120' => 6,
                        '3-5-60' => 5,
                        '3-5-180' => 2,
                        '3-6-0' => 5,
                        '3-6-120' => 3,
                        '3-6-60' => 2,
                        '3-6-180' => 1,
                        '3-7-0' => 3,
                        '3-7-120' => 2,
                        '3-7-60' => 1,
                        '3-7-180' => 1,
                        '3-8-0' => 2,
                        '3-8-120' => 2,
                        '3-8-60' => 1,
                        '3-8-180' => 1,
                        '3-9-0' => 3,
                        '3-9-120' => 2,
                        '3-9-60' => 1,
                        '3-9-180' => 1,
                        '3' => 2, // 与内环盘行星无相位及未提及的相位时
                        '3-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score5 = $this->getQlzs($synastry, $confs5);
                // 计算亲密
                $confs6 = [
                    'first' => [
                        7 => 7,
                        4 => 6,
                        8 => 5,
                        5 => 4,
                        12 => 2,
                        1 => 1
                    ],
                    'first_id' => [3, 4],
                    'first_base' => 3,
                    'phase' => [
                        '4-0-0' => 14, // 权重加倍（最好的情况）
                        '4-0-120' => 7,
                        '4-0-60' => 6,
                        '4-0-180' => 2,
                        '4-1-0' => 14, // 权重加倍（最好的情况）
                        '4-1-120' => 6,
                        '4-1-60' => 5,
                        '4-1-180' => 2,
                        '4-2-0' => 7,
                        '4-2-120' => 6,
                        '4-2-60' => 5,
                        '4-2-180' => 1,
                        '4-3-0' => 7,
                        '4-3-120' => 6,
                        '4-3-60' => 5,
                        '4-3-180' => 1,
                        '4-4-0' => 5,
                        '4-4-120' => 4,
                        '4-4-60' => 4,
                        '4-4-180' => 2,
                        '4-5-0' => 7,
                        '4-5-120' => 6,
                        '4-5-60' => 6,
                        '4-5-180' => 3,
                        '4-6-0' => 4,
                        '4-6-120' => 3,
                        '4-6-60' => 2,
                        '4-6-180' => 1,
                        '4-7-0' => 2,
                        '4-7-120' => 2,
                        '4-7-60' => 2,
                        '4-8-0' => 2,
                        '4-8-120' => 2,
                        '4-8-60' => 1,
                        '4-9-0' => 5,
                        '4-9-120' => 4,
                        '4-9-60' => 3,
                        '4-9-180' => 1,
                        '4' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '4-90' => 1, // 与内环盘行星90度相位时

                        '3-0-0' => 6,
                        '3-0-120' => 5,
                        '3-0-60' => 4,
                        '3-0-180' => 2,
                        '3-1-0' => 14, // 权重加倍（最好的情况）
                        '3-1-120' => 6,
                        '3-1-60' => 5,
                        '3-1-180' => 1,
                        '3-2-0' => 7,
                        '3-2-120' => 6,
                        '3-2-60' => 5,
                        '3-2-180' => 1,
                        '3-3-0' => 6,
                        '3-3-120' => 5,
                        '3-3-60' => 4,
                        '3-3-180' => 1,
                        '3-4-0' => 14, // 权重加倍（最好的情况）
                        '3-4-120' => 6,
                        '3-4-60' => 4,
                        '3-4-180' => 1,
                        '3-5-0' => 7,
                        '3-5-120' => 6,
                        '3-5-60' => 5,
                        '3-5-180' => 2,
                        '3-6-0' => 5,
                        '3-6-120' => 3,
                        '3-6-60' => 2,
                        '3-6-180' => 1,
                        '3-7-0' => 3,
                        '3-7-120' => 2,
                        '3-7-60' => 1,
                        '3-7-180' => 1,
                        '3-8-0' => 2,
                        '3-8-120' => 2,
                        '3-8-60' => 1,
                        '3-8-180' => 1,
                        '3-9-0' => 3,
                        '3-9-120' => 2,
                        '3-9-60' => 1,
                        '3-9-180' => 1,
                        '3' => 2, // 与内环盘行星无相位及未提及的相位时
                        '3-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score6 = $this->getQlzs($synastry, $confs6);

                // 计算相处预判  组合盘 恋爱：初识、交往中、长期交往、内心感受
                $confs7 = [
                    'pids' => [0, 17],
                    'signs' => [
                        '17-1' => 40,
                        '17-2' => 60,
                        '17-3' => 80,
                        '17-4' => 80,
                        '17-5' => 100,
                        '17-6' => 60,
                        '17-7' => 80,
                        '17-8' => 20,
                        '17-9' => 100,
                        '17-10' => 20,
                        '17-11' => 20,
                        '17-12' => 100,

                        '0-1' => 60,
                        '0-2' => 80,
                        '0-3' => 60,
                        '0-4' => 100,
                        '0-5' => 100,
                        '0-6' => 80,
                        '0-7' => 20,
                        '0-8' => 60,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 20,
                        '0-12' => 80,
                    ],
                ];
                $score7 = $this->getXcyp($composite, $confs7);
                $confs8 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'signs' => [
                        '0-1' => 80,
                        '0-2' => 60,
                        '0-3' => 60,
                        '0-4' => 80,
                        '0-5' => 100,
                        '0-6' => 60,
                        '0-7' => 20,
                        '0-8' => 80,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 20,
                        '0-12' => 80,

                        '1-1' => 80,
                        '1-2' => 60,
                        '1-3' => 60,
                        '1-4' => 100,
                        '1-5' => 80,
                        '1-6' => 40,
                        '1-7' => 40,
                        '1-8' => 20,
                        '1-9' => 80,
                        '1-10' => 20,
                        '1-11' => 20,
                        '1-12' => 80,

                        '2-1' => 40,
                        '2-2' => 60,
                        '2-3' => 80,
                        '2-4' => 80,
                        '2-5' => 20,
                        '2-6' => 100,
                        '2-7' => 60,
                        '2-8' => 60,
                        '2-9' => 40,
                        '2-10' => 80,
                        '2-11' => 60,
                        '2-12' => 60,

                        '3-1' => 40,
                        '3-2' => 100,
                        '3-3' => 60,
                        '3-4' => 80,
                        '3-5' => 80,
                        '3-6' => 20,
                        '3-7' => 100,
                        '3-8' => 80,
                        '3-9' => 60,
                        '3-10' => 60,
                        '3-11' => 40,
                        '3-12' => 80,

                        '4-1' => 100,
                        '4-2' => 40,
                        '4-3' => 60,
                        '4-4' => 20,
                        '4-5' => 100,
                        '4-6' => 40,
                        '4-7' => 40,
                        '4-8' => 100,
                        '4-9' => 80,
                        '4-10' => 80,
                        '4-11' => 20,
                        '4-12' => 60,
                    ],
                ];
                $score8 = $this->getXcyp($composite, $confs8);
                $confs9 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'signs' => [
                        '0-1' => 40,
                        '0-2' => 60,
                        '0-3' => 80,
                        '0-4' => 100,
                        '0-5' => 100,
                        '0-6' => 20,
                        '0-7' => 100,
                        '0-8' => 40,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 80,
                        '0-12' => 40,

                        '1-1' => 40,
                        '1-2' => 40,
                        '1-3' => 80,
                        '1-4' => 100,
                        '1-5' => 100,
                        '1-6' => 40,
                        '1-7' => 100,
                        '1-8' => 40,
                        '1-9' => 80,
                        '1-10' => 80,
                        '1-11' => 60,
                        '1-12' => 20,

                        '2-1' => 60,
                        '2-2' => 60,
                        '2-3' => 100,
                        '2-4' => 80,
                        '2-5' => 80,
                        '2-6' => 40,
                        '2-7' => 100,
                        '2-8' => 40,
                        '2-9' => 80,
                        '2-10' => 80,
                        '2-11' => 60,
                        '2-12' => 20,

                        '3-1' => 40,
                        '3-2' => 60,
                        '3-3' => 80,
                        '3-4' => 100,
                        '3-5' => 100,
                        '3-6' => 40,
                        '3-7' => 100,
                        '3-8' => 60,
                        '3-9' => 80,
                        '3-10' => 60,
                        '3-11' => 60,
                        '3-12' => 20,

                        '4-1' => 60,
                        '4-2' => 60,
                        '4-3' => 80,
                        '4-4' => 80,
                        '4-5' => 100,
                        '4-6' => 20,
                        '4-7' => 100,
                        '4-8' => 80,
                        '4-9' => 80,
                        '4-10' => 80,
                        '4-11' => 60,
                        '4-12' => 20,
                    ],
                ];
                $score9 = $this->getXcyp($composite, $confs9);
                $confs10 = [
                    'pids' => [1, 19],
                    'signs' => [
                        '19-1' => 20,
                        '19-2' => 80,
                        '19-3' => 60,
                        '19-4' => 100,
                        '19-5' => 80,
                        '19-6' => 80,
                        '19-7' => 40,
                        '19-8' => 20,
                        '19-9' => 40,
                        '19-10' => 60,
                        '19-11' => 20,
                        '19-12' => 100,

                        '1-1' => 60,
                        '1-2' => 60,
                        '1-3' => 80,
                        '1-4' => 100,
                        '1-5' => 80,
                        '1-6' => 80,
                        '1-7' => 40,
                        '1-8' => 40,
                        '1-9' => 40,
                        '1-10' => 60,
                        '1-11' => 60,
                        '1-12' => 80,
                    ],
                ];
                $score10 = $this->getXcyp($composite, $confs10);

                // 计算恋爱关系主导 组合盘
                $confs11 = [
                    'pid' => ($sex1 === 1 ? 0 : 1), // 男看太阳女看月
                    'signs' => [
                        '0-1' => 80,
                        '0-2' => 70,
                        '0-3' => 20,
                        '0-4' => 70,
                        '0-5' => 90,
                        '0-6' => 50,
                        '0-7' => 10,
                        '0-8' => 50,
                        '0-9' => 40,
                        '0-10' => 70,
                        '0-11' => 20,
                        '0-12' => 60,

                        '1-1' => 30,
                        '1-2' => 80,
                        '1-3' => 30,
                        '1-4' => 90,
                        '1-5' => 70,
                        '1-6' => 30,
                        '1-7' => 50,
                        '1-8' => 10,
                        '1-9' => 60,
                        '1-10' => 20,
                        '1-11' => 20,
                        '1-12' => 60,
                    ],
                ];
                $score11 = $this->getBj(0, $composite, $confs11);

                break;
            case 9:
                // 计算婚姻潜力指数
                // 婚姻：尊重信任、支持理解、事业财富、共同目标、妥协忍让、性和谐
                $astroData = $synastry;
                $confs1 = [
                    'first' => [
                        7 => 7,
                        10 => 6,
                        4 => 5,
                        1 => 4,
                        12 => 2,
                        8 => 1,
                    ],
                    'first_id' => [0, 1],
                    'first_base' => 3,
                    'phase' => [
                        '0-0-0' => 7,
                        '0-0-120' => 6,
                        '0-0-60' => 5,
                        '0-0-180' => 1,
                        '0-1-0' => 14, // 权重加倍（最好的情况）
                        '0-1-120' => 6,
                        '0-1-60' => 5,
                        '0-1-180' => 2,
                        '0-2-0' => 14, // 权重加倍（最好的情况）
                        '0-2-120' => 6,
                        '0-2-60' => 5,
                        '0-2-180' => 1,
                        '0-3-0' => 6,
                        '0-3-120' => 5,
                        '0-3-60' => 4,
                        '0-3-180' => 1,
                        '0-4-0' => 5,
                        '0-4-120' => 4,
                        '0-4-60' => 3,
                        '0-4-180' => 1,
                        '0-5-0' => 7,
                        '0-5-120' => 6,
                        '0-5-60' => 5,
                        '0-5-180' => 2,
                        '0-6-0' => 6,
                        '0-6-120' => 5,
                        '0-6-60' => 4,
                        '0-6-180' => 1,
                        '0-7-0' => 3,
                        '0-7-120' => 2,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 2,
                        '0-8-120' => 1,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 5,
                        '0-9-120' => 4,
                        '0-9-60' => 3,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时

                        '1-0-0' => 14, // 权重加倍（最好的情况）
                        '1-0-120' => 6,
                        '1-0-60' => 5,
                        '1-0-180' => 2,
                        '1-1-0' => 7,
                        '1-1-120' => 6,
                        '1-1-60' => 5,
                        '1-1-180' => 2,
                        '1-2-0' => 14, // 权重加倍（最好的情况）
                        '1-2-120' => 6,
                        '1-2-60' => 5,
                        '1-2-180' => 1,
                        '1-3-0' => 7,
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 1,
                        '1-4-0' => 4,
                        '1-4-120' => 3,
                        '1-4-60' => 2,
                        '1-4-180' => 1,
                        '1-5-0' => 7,
                        '1-5-120' => 6,
                        '1-5-60' => 5,
                        '1-5-180' => 1,
                        '1-6-0' => 4,
                        '1-6-120' => 3,
                        '1-6-60' => 2,
                        '1-6-180' => 1,
                        '1-7-0' => 3,
                        '1-7-120' => 2,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 2,
                        '1-8-120' => 1,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 3,
                        '1-9-120' => 2,
                        '1-9-60' => 2,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 5,
                        1 => 4,
                        17 => 3,
                    ],
                ];
                // 计算尊重信任
                $score1 = $this->getQlzs($synastry, $confs1);
                // 计算支持理解
                $confs2 = [
                    'first' => [
                        3 => 7,
                        9 => 6,
                        4 => 5,
                        10 => 4,
                        12 => 2,
                        8 => 1,
                    ],
                    'first_id' => [0, 2],
                    'first_base' => 3,
                    'phase' => [
                        '0-0-0' => 7,
                        '0-0-120' => 6,
                        '0-0-60' => 5,
                        '0-0-180' => 1,
                        '0-1-0' => 7,
                        '0-1-120' => 6,
                        '0-1-60' => 5,
                        '0-1-180' => 2,
                        '0-2-0' => 14, // 权重加倍（最好的情况）
                        '0-2-120' => 6,
                        '0-2-60' => 5,
                        '0-2-180' => 2,
                        '0-3-0' => 6,
                        '0-3-120' => 5,
                        '0-3-60' => 4,
                        '0-3-180' => 1,
                        '0-4-0' => 14, // 权重加倍（最好的情况）
                        '0-4-120' => 6,
                        '0-4-60' => 5,
                        '0-4-180' => 2,
                        '0-5-0' => 7,
                        '0-5-120' => 6,
                        '0-5-60' => 5,
                        '0-5-180' => 2,
                        '0-6-0' => 5,
                        '0-6-120' => 4,
                        '0-6-60' => 3,
                        '0-6-180' => 1,
                        '0-7-0' => 5,
                        '0-7-120' => 4,
                        '0-7-60' => 3,
                        '0-7-180' => 1,
                        '0-8-0' => 5,
                        '0-8-120' => 4,
                        '0-8-60' => 3,
                        '0-8-180' => 1,
                        '0-9-0' => 3,
                        '0-9-120' => 2,
                        '0-9-60' => 1,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时

                        '2-0-0' => 7,
                        '2-0-120' => 6,
                        '2-0-60' => 5,
                        '2-0-180' => 2,
                        '2-1-0' => 7,
                        '2-1-120' => 6,
                        '2-1-60' => 5,
                        '2-1-180' => 2,
                        '2-2-0' => 14, // 权重加倍（最好的情况）
                        '2-2-120' => 6,
                        '2-2-60' => 5,
                        '2-2-180' => 1,
                        '2-3-0' => 6,
                        '2-3-120' => 5,
                        '2-3-60' => 4,
                        '2-3-180' => 1,
                        '2-4-0' => 14, // 权重加倍（最好的情况）
                        '2-4-120' => 6,
                        '2-4-60' => 5,
                        '2-4-180' => 2,
                        '2-5-0' => 7,
                        '2-5-120' => 6,
                        '2-5-60' => 5,
                        '2-5-180' => 1,
                        '2-6-0' => 3,
                        '2-6-120' => 2,
                        '2-6-60' => 2,
                        '2-6-180' => 1,
                        '2-7-0' => 5,
                        '2-7-120' => 4,
                        '2-7-60' => 3,
                        '2-7-180' => 1,
                        '2-8-0' => 4,
                        '2-8-120' => 3,
                        '2-8-60' => 2,
                        '2-8-180' => 1,
                        '2-9-0' => 3,
                        '2-9-120' => 2,
                        '2-9-60' => 1,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 5,
                        1 => 4,
                        17 => 3,
                    ],
                ];
                $score2 = $this->getQlzs($synastry, $confs2);
                // 计算事业财富
                $confs3 = [
                    'first' => [
                        2 => 7,
                        10 => 6,
                        6 => 5,
                        8 => 4,
                        12 => 2,
                        1 => 1,
                    ],
                    'first_id' => [0, 3],
                    'first_base' => 3,
                    'phase' => [
                        '3-0-0' => 14, // 权重加倍（最好的情况）
                        '3-0-120' => 6,
                        '3-0-60' => 5,
                        '3-0-180' => 2,
                        '3-1-0' => 4,
                        '3-1-120' => 3,
                        '3-1-60' => 2,
                        '3-1-180' => 1,
                        '3-2-0' => 6,
                        '3-2-120' => 5,
                        '3-2-60' => 4,
                        '3-2-180' => 1,
                        '3-3-0' => 14, // 权重加倍（最好的情况）
                        '3-3-120' => 6,
                        '3-3-60' => 5,
                        '3-3-180' => 2,
                        '3-4-0' => 7,
                        '3-4-120' => 6,
                        '3-4-60' => 5,
                        '3-4-180' => 2,
                        '3-5-0' => 7,
                        '3-5-120' => 6,
                        '3-5-60' => 5,
                        '3-5-180' => 2,
                        '3-6-0' => 3,
                        '3-6-120' => 2,
                        '3-6-60' => 1,
                        '3-6-180' => 1,
                        '3-7-0' => 5,
                        '3-7-120' => 4,
                        '3-7-60' => 3,
                        '3-7-180' => 1,
                        '3-8-0' => 3,
                        '3-8-120' => 2,
                        '3-8-60' => 2,
                        '3-8-180' => 1,
                        '3-9-0' => 4,
                        '3-9-120' => 3,
                        '3-9-60' => 2,
                        '3-9-180' => 1,
                        '3' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '3-90' => 1, // 与内环盘行星90度相位时

                        '0-0-0' => 7,
                        '0-0-120' => 6,
                        '0-0-60' => 5,
                        '0-0-180' => 2,
                        '0-1-0' => 4,
                        '0-1-120' => 3,
                        '0-1-60' => 2,
                        '0-1-180' => 1,
                        '0-2-0' => 6,
                        '0-2-120' => 5,
                        '0-2-60' => 4,
                        '0-2-180' => 1,
                        '0-3-0' => 14,
                        '0-3-120' => 6,
                        '0-3-60' => 5,
                        '0-3-180' => 2,
                        '0-4-0' => 7,
                        '0-4-120' => 6,
                        '0-4-60' => 5,
                        '0-4-180' => 2,
                        '0-5-0' => 7,
                        '0-5-120' => 12, // 权重加倍（最好的情况）
                        '0-5-60' => 5,
                        '0-5-180' => 1,
                        '0-6-0' => 2,
                        '0-6-120' => 2,
                        '0-6-60' => 1,
                        '0-6-180' => 1,
                        '0-7-0' => 3,
                        '0-7-120' => 2,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 2,
                        '0-8-120' => 2,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 6,
                        '0-9-120' => 5,
                        '0-9-60' => 4,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 5,
                        1 => 4,
                        17 => 3,
                    ],
                ];
                $score3 = $this->getQlzs($synastry, $confs3);
                // 计算共同目标
                $confs4 = [
                    'first' => [
                        9 => 7,
                        10 => 6,
                        11 => 5,
                        2 => 4,
                        12 => 2,
                        8 => 1,
                    ],
                    'first_id' => [0, 1],
                    'first_base' => 3,
                    'phase' => [
                        '0-0-0' => 14, // 权重加倍（最好的情况）
                        '0-0-120' => 6,
                        '0-0-60' => 5,
                        '0-0-180' => 2,
                        '0-1-0' => 6,
                        '0-1-120' => 5,
                        '0-1-60' => 4,
                        '0-1-180' => 1,
                        '0-2-0' => 6,
                        '0-2-120' => 5,
                        '0-2-60' => 4,
                        '0-2-180' => 1,
                        '0-3-0' => 6,
                        '0-3-120' => 5,
                        '0-3-60' => 4,
                        '0-3-180' => 1,
                        '0-4-0' => 14, // 权重加倍（最好的情况）
                        '0-4-120' => 6,
                        '0-4-60' => 5,
                        '0-4-180' => 2,
                        '0-5-0' => 7,
                        '0-5-120' => 6,
                        '0-5-60' => 5,
                        '0-5-180' => 3,
                        '0-6-0' => 2,
                        '0-6-120' => 3,
                        '0-6-60' => 1,
                        '0-6-180' => 1,
                        '0-7-0' => 2,
                        '0-7-120' => 3,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 2,
                        '0-8-120' => 3,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 2,
                        '0-9-120' => 3,
                        '0-9-60' => 1,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时

                        '1-0-0' => 14, // 权重加倍（最好的情况）
                        '1-0-120' => 6,
                        '1-0-60' => 5,
                        '1-0-180' => 2,
                        '1-1-0' => 6,
                        '1-1-120' => 5,
                        '1-1-60' => 4,
                        '1-1-180' => 1,
                        '1-2-0' => 6,
                        '1-2-120' => 5,
                        '1-2-60' => 4,
                        '1-2-180' => 1,
                        '1-3-0' => 6,
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 1,
                        '1-4-0' => 14, // 权重加倍（最好的情况）
                        '1-4-120' => 6,
                        '1-4-60' => 5,
                        '1-4-180' => 1,
                        '1-5-0' => 6,
                        '1-5-120' => 5,
                        '1-5-60' => 4,
                        '1-5-180' => 1,
                        '1-6-0' => 2,
                        '1-6-120' => 3,
                        '1-6-60' => 1,
                        '1-6-180' => 1,
                        '1-7-0' => 2,
                        '1-7-120' => 3,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 2,
                        '1-8-120' => 3,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 2,
                        '1-9-120' => 3,
                        '1-9-60' => 1,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 5,
                        1 => 4,
                        17 => 3,
                    ],
                ];
                $score4 = $this->getQlzs($synastry, $confs4);
                // 计算妥协忍让
                $confs5 = [
                    'first' => [
                        3 => 7,
                        9 => 6,
                        7 => 5,
                        4 => 4,
                        12 => 2,
                        8 => 1
                    ],
                    'first_id' => [2, 1],
                    'first_base' => 3,
                    'phase' => [
                        '2-0-0' => 7,
                        '2-0-120' => 14, // 权重加倍（最好的情况）
                        '2-0-60' => 6,
                        '2-0-180' => 2,
                        '2-1-0' => 14, // 权重加倍（最好的情况）
                        '2-1-120' => 6,
                        '2-1-60' => 5,
                        '2-1-180' => 2,
                        '2-2-0' => 6,
                        '2-2-120' => 5,
                        '2-2-60' => 4,
                        '2-2-180' => 1,
                        '2-3-0' => 7,
                        '2-3-120' => 6,
                        '2-3-60' => 5,
                        '2-3-180' => 1,
                        '2-4-0' => 5,
                        '2-4-120' => 4,
                        '2-4-60' => 4,
                        '2-4-180' => 2,
                        '2-5-0' => 7,
                        '2-5-120' => 6,
                        '2-5-60' => 6,
                        '2-5-180' => 3,
                        '2-6-0' => 5,
                        '2-6-120' => 3,
                        '2-6-60' => 2,
                        '2-6-180' => 1,
                        '2-7-0' => 2,
                        '2-7-120' => 3,
                        '2-7-60' => 1,
                        '2-7-180' => 1,
                        '2-8-0' => 2,
                        '2-8-120' => 3,
                        '2-8-60' => 1,
                        '2-8-180' => 1,
                        '2-9-0' => 2,
                        '2-9-120' => 3,
                        '2-9-60' => 1,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时

                        '1-0-0' => 14, // 权重加倍（最好的情况）
                        '1-0-120' => 6,
                        '1-0-60' => 5,
                        '1-0-180' => 2,
                        '1-1-0' => 6,
                        '1-1-120' => 14, // 权重加倍（最好的情况）
                        '1-1-60' => 5,
                        '1-1-180' => 1,
                        '1-2-0' => 6,
                        '1-2-120' => 5,
                        '1-2-60' => 4,
                        '1-2-180' => 1,
                        '1-3-0' => 6,
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 1,
                        '1-4-0' => 5,
                        '1-4-120' => 4,
                        '1-4-60' => 3,
                        '1-4-180' => 1,
                        '1-5-0' => 7,
                        '1-5-120' => 6,
                        '1-5-60' => 5,
                        '1-5-180' => 2,
                        '1-6-0' => 5,
                        '1-6-120' => 3,
                        '1-6-60' => 2,
                        '1-6-180' => 1,
                        '1-7-0' => 2,
                        '1-7-120' => 3,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 2,
                        '1-8-120' => 3,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 5,
                        '1-9-120' => 6,
                        '1-9-60' => 4,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 5,
                        1 => 4,
                        17 => 3,
                    ],
                ];
                $score5 = $this->getQlzs($synastry, $confs5);
                // 计算性和谐
                $confs6 = [
                    'first' => [
                        8 => 7,
                        5 => 6,
                        7 => 5,
                        11 => 4,
                        12 => 2,
                        6 => 1
                    ],
                    'first_id' => [3, 4],
                    'first_base' => 3,
                    'phase' => [
                        '4-0-0' => 14, // 权重加倍（最好的情况）
                        '4-0-120' => 6,
                        '4-0-60' => 5,
                        '4-0-180' => 2,
                        '4-1-0' => 14, // 权重加倍（最好的情况）
                        '4-1-120' => 6,
                        '4-1-60' => 5,
                        '4-1-180' => 2,
                        '4-2-0' => 4,
                        '4-2-120' => 3,
                        '4-2-60' => 2,
                        '4-2-180' => 1,
                        '4-3-0' => 6,
                        '4-3-120' => 5,
                        '4-3-60' => 4,
                        '4-3-180' => 3,
                        '4-4-0' => 5,
                        '4-4-120' => 6,
                        '4-4-60' => 4,
                        '4-4-180' => 1,
                        '4-5-0' => 6,
                        '4-5-120' => 5,
                        '4-5-60' => 4,
                        '4-5-180' => 3,
                        '4-6-0' => 2,
                        '4-6-120' => 3,
                        '4-6-60' => 1,
                        '4-6-180' => 1,
                        '4-7-0' => 2,
                        '4-7-120' => 3,
                        '4-7-60' => 1,
                        '4-7-180' => 1,
                        '4-8-0' => 2,
                        '4-8-120' => 3,
                        '4-8-60' => 1,
                        '4-8-180' => 1,
                        '4-9-0' => 4,
                        '4-9-120' => 5,
                        '4-9-60' => 2,
                        '4-9-180' => 3,
                        '4' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '4-90' => 1, // 与内环盘行星90度相位时

                        '3-0-0' => 6,
                        '3-0-120' => 5,
                        '3-0-60' => 4,
                        '3-0-180' => 3,
                        '3-1-0' => 6,
                        '3-1-120' => 5,
                        '3-1-60' => 4,
                        '3-1-180' => 3,
                        '3-2-0' => 5,
                        '3-2-120' => 4,
                        '3-2-60' => 3,
                        '3-2-180' => 2,
                        '3-3-0' => 6,
                        '3-3-120' => 5,
                        '3-3-60' => 4,
                        '3-3-180' => 3,
                        '3-4-0' => 14, // 权重加倍（最好的情况）
                        '3-4-120' => 14, // 权重加倍（最好的情况）
                        '3-4-60' => 5,
                        '3-4-180' => 4,
                        '3-5-0' => 6,
                        '3-5-120' => 5,
                        '3-5-60' => 4,
                        '3-5-180' => 1,
                        '3-6-0' => 2,
                        '3-6-120' => 3,
                        '3-6-60' => 1,
                        '3-6-180' => 1,
                        '3-7-0' => 2,
                        '3-7-120' => 3,
                        '3-7-60' => 1,
                        '3-7-180' => 1,
                        '3-8-0' => 2,
                        '3-8-120' => 3,
                        '3-8-60' => 1,
                        '3-8-180' => 1,
                        '3-9-0' => 4,
                        '3-9-120' => 5,
                        '3-9-60' => 3,
                        '3-9-180' => 6,
                        '3' => 2, // 与内环盘行星无相位及未提及的相位时
                        '3-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 5,
                        1 => 4,
                        3 => 3,
                        4 => 2,
                    ],
                ];
                $score6 = $this->getQlzs($synastry, $confs6);

                // 计算相处预判  时空盘 婚姻：恋爱、新婚燕尔、老夫老妻、内心感受
                $confs7 = [
                    'pids' => [17, 0, 3],
                    'signs' => [
                        '17-1' => 40,
                        '17-2' => 60,
                        '17-3' => 40,
                        '17-4' => 100,
                        '17-5' => 80,
                        '17-6' => 80,
                        '17-7' => 60,
                        '17-8' => 20,
                        '17-9' => 80,
                        '17-10' => 60,
                        '17-11' => 20,
                        '17-12' => 80,

                        '0-1' => 60,
                        '0-2' => 80,
                        '0-3' => 60,
                        '0-4' => 100,
                        '0-5' => 100,
                        '0-6' => 80,
                        '0-7' => 20,
                        '0-8' => 60,
                        '0-9' => 60,
                        '0-10' => 80,
                        '0-11' => 20,
                        '0-12' => 80,

                        '3-1' => 40,
                        '3-2' => 100,
                        '3-3' => 60,
                        '3-4' => 80,
                        '3-5' => 80,
                        '3-6' => 60,
                        '3-7' => 100,
                        '3-8' => 40,
                        '3-9' => 60,
                        '3-10' => 80,
                        '3-11' => 40,
                        '3-12' => 80,
                    ],
                ];
                $score7 = $this->getXcyp($davison, $confs7);
                $confs8 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'houses' => [
                        '0-1' => 20,
                        '0-2' => 80,
                        '0-3' => 80,
                        '0-4' => 100,
                        '0-5' => 100,
                        '0-6' => 40,
                        '0-7' => 100,
                        '0-8' => 40,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 60,
                        '0-12' => 20,

                        '1-1' => 40,
                        '1-2' => 40,
                        '1-3' => 80,
                        '1-4' => 100,
                        '1-5' => 100,
                        '1-6' => 40,
                        '1-7' => 100,
                        '1-8' => 20,
                        '1-9' => 80,
                        '1-10' => 80,
                        '1-11' => 60,
                        '1-12' => 20,

                        '2-1' => 40,
                        '2-2' => 80,
                        '2-3' => 100,
                        '2-4' => 80,
                        '2-5' => 80,
                        '2-6' => 40,
                        '2-7' => 100,
                        '2-8' => 40,
                        '2-9' => 100,
                        '2-10' => 80,
                        '2-11' => 60,
                        '2-12' => 20,

                        '3-1' => 60,
                        '3-2' => 100,
                        '3-3' => 80,
                        '3-4' => 100,
                        '3-5' => 80,
                        '3-6' => 40,
                        '3-7' => 100,
                        '3-8' => 40,
                        '3-9' => 80,
                        '3-10' => 80,
                        '3-11' => 60,
                        '3-12' => 20,

                        '4-1' => 40,
                        '4-2' => 60,
                        '4-3' => 80,
                        '4-4' => 80,
                        '4-5' => 60,
                        '4-6' => 60,
                        '4-7' => 80,
                        '4-8' => 80,
                        '4-9' => 80,
                        '4-10' => 100,
                        '4-11' => 60,
                        '4-12' => 20,
                    ],
                ];
                $score8 = $this->getXcyp($davison, $confs8);
                $confs9 = [
                    'pids' => [19, 1],
                    'signs' => [
                        '19-1' => 40,
                        '19-2' => 100,
                        '19-3' => 40,
                        '19-4' => 100,
                        '19-5' => 100,
                        '19-6' => 80,
                        '19-7' => 40,
                        '19-8' => 20,
                        '19-9' => 60,
                        '19-10' => 60,
                        '19-11' => 20,
                        '19-12' => 80,

                        '1-1' => 80,
                        '1-2' => 80,
                        '1-3' => 60,
                        '1-4' => 100,
                        '1-5' => 60,
                        '1-6' => 80,
                        '1-7' => 40,
                        '1-8' => 20,
                        '1-9' => 40,
                        '1-10' => 60,
                        '1-11' => 40,
                        '1-12' => 80,
                    ],
                ];
                $score9 = $this->getXcyp($davison, $confs9);
                $confs10 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'signs' => [
                        '0-1' => 80,
                        '0-2' => 80,
                        '0-3' => 40,
                        '0-4' => 100,
                        '0-5' => 100,
                        '0-6' => 80,
                        '0-7' => 20,
                        '0-8' => 60,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 20,
                        '0-12' => 80,

                        '1-1' => 100,
                        '1-2' => 80,
                        '1-3' => 40,
                        '1-4' => 100,
                        '1-5' => 60,
                        '1-6' => 60,
                        '1-7' => 40,
                        '1-8' => 20,
                        '1-9' => 60,
                        '1-10' => 40,
                        '1-11' => 20,
                        '1-12' => 100,

                        '2-1' => 40,
                        '2-2' => 60,
                        '2-3' => 80,
                        '2-4' => 80,
                        '2-5' => 20,
                        '2-6' => 100,
                        '2-7' => 60,
                        '2-8' => 40,
                        '2-9' => 60,
                        '2-10' => 80,
                        '2-11' => 60,
                        '2-12' => 60,

                        '3-1' => 20,
                        '3-2' => 100,
                        '3-3' => 60,
                        '3-4' => 80,
                        '3-5' => 80,
                        '3-6' => 60,
                        '3-7' => 80,
                        '3-8' => 40,
                        '3-9' => 80,
                        '3-10' => 80,
                        '3-11' => 20,
                        '3-12' => 80,

                        '4-1' => 100,
                        '4-2' => 20,
                        '4-3' => 60,
                        '4-4' => 40,
                        '4-5' => 100,
                        '4-6' => 60,
                        '4-7' => 40,
                        '4-8' => 100,
                        '4-9' => 80,
                        '4-10' => 80,
                        '4-11' => 40,
                        '4-12' => 40,
                    ],
                ];
                $score10 = $this->getXcyp($davison, $confs10);

                // 计算婚姻付出比较 时空盘
                $confs11 = [
                    'pid' => ($sex1 === 1 ? 0 : 1), // 男看太阳女看月
                    'signs' => [
                        '0-1' => 80,
                        '0-2' => 70,
                        '0-3' => 20,
                        '0-4' => 70,
                        '0-5' => 90,
                        '0-6' => 50,
                        '0-7' => 10,
                        '0-8' => 50,
                        '0-9' => 40,
                        '0-10' => 70,
                        '0-11' => 20,
                        '0-12' => 60,

                        '1-1' => 30,
                        '1-2' => 80,
                        '1-3' => 30,
                        '1-4' => 90,
                        '1-5' => 70,
                        '1-6' => 30,
                        '1-7' => 50,
                        '1-8' => 10,
                        '1-9' => 60,
                        '1-10' => 20,
                        '1-11' => 20,
                        '1-12' => 60,
                    ],
                ];
                $score11 = $this->getBj(0, $davison, $confs11);
                break;
            case 10:
                // 计算事业潜力指数
                // 事业：互相成就、团队协作、利益拟合、目标一致、信任支持、沟通交流
                $confs1 = [
                    'first' => [
                        10 => 7,
                        9 => 6,
                        2 => 5,
                        7 => 4,
                        12 => 2,
                        6 => 1,
                    ],
                    'first_id' => [0, 1],
                    'first_base' => 3,
                    'phase' => [
                        '0-0-0' => 14, // 权重加倍（最好的情况）
                        '0-0-120' => 7,
                        '0-0-60' => 5,
                        '0-0-180' => 2,
                        '0-1-0' => 7,
                        '0-1-120' => 6,
                        '0-1-60' => 5,
                        '0-1-180' => 2,
                        '0-2-0' => 7,
                        '0-2-120' => 7,
                        '0-2-60' => 5,
                        '0-2-180' => 2,
                        '0-3-0' => 14, // 权重加倍（最好的情况）
                        '0-3-120' => 6,
                        '0-3-60' => 5,
                        '0-3-180' => 2,
                        '0-4-0' => 6,
                        '0-4-120' => 5,
                        '0-4-60' => 4,
                        '0-4-180' => 2,
                        '0-5-0' => 7,
                        '0-5-120' => 6,
                        '0-5-60' => 5,
                        '0-5-180' => 2,
                        '0-6-0' => 5,
                        '0-6-120' => 4,
                        '0-6-60' => 3,
                        '0-6-180' => 1,
                        '0-7-0' => 6,
                        '0-7-120' => 5,
                        '0-7-60' => 4,
                        '0-7-180' => 1,
                        '0-8-0' => 2,
                        '0-8-120' => 2,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 6,
                        '0-9-120' => 5,
                        '0-9-60' => 4,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时

                        '1-0-0' => 14, // 权重加倍（最好的情况）
                        '1-0-120' => 5,
                        '1-0-60' => 4,
                        '1-0-180' => 2,
                        '1-1-0' => 6,
                        '1-1-120' => 5,
                        '1-1-60' => 4,
                        '1-1-180' => 1,
                        '1-2-0' => 6,
                        '1-2-120' => 5,
                        '1-2-60' => 4,
                        '1-2-180' => 1,
                        '1-3-0' => 14, // 权重加倍（最好的情况）
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 2,
                        '1-4-0' => 6,
                        '1-4-120' => 7,
                        '1-4-60' => 5,
                        '1-4-180' => 1,
                        '1-5-0' => 6,
                        '1-5-120' => 5,
                        '1-5-60' => 4,
                        '1-5-180' => 2,
                        '1-6-0' => 2,
                        '1-6-120' => 2,
                        '1-6-60' => 1,
                        '1-6-180' => 1,
                        '1-7-0' => 3,
                        '1-7-120' => 2,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 3,
                        '1-8-120' => 2,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 3,
                        '1-9-120' => 2,
                        '1-9-60' => 1,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6
                    ],
                ];
                // 计算互相成就
                $score1 = $this->getQlzs($synastry, $confs1);
                // 计算团队协作
                $confs2 = [
                    'first' => [
                        11 => 7,
                        7 => 6,
                        10 => 5,
                        3 => 4,
                        12 => 2,
                        1 => 1,
                    ],
                    'first_id' => [2, 4],
                    'first_base' => 3,
                    'phase' => [
                        '4-0-0' => 14, // 权重加倍（最好的情况）
                        '4-0-120' => 6,
                        '4-0-60' => 5,
                        '4-0-180' => 2,
                        '4-1-0' => 6,
                        '4-1-120' => 5,
                        '4-1-60' => 4,
                        '4-1-180' => 1,
                        '4-2-0' => 7,
                        '4-2-120' => 6,
                        '4-2-60' => 5,
                        '4-2-180' => 1,
                        '4-3-0' => 7,
                        '4-3-120' => 6,
                        '4-3-60' => 5,
                        '4-3-180' => 2,
                        '4-4-0' => 14, // 权重加倍（最好的情况）
                        '4-4-120' => 6,
                        '4-4-60' => 5,
                        '4-4-180' => 2,
                        '4-5-0' => 7,
                        '4-5-120' => 6,
                        '4-5-60' => 5,
                        '4-5-180' => 2,
                        '4-6-0' => 5,
                        '4-6-120' => 4,
                        '4-6-60' => 3,
                        '4-6-180' => 1,
                        '4-7-0' => 5,
                        '4-7-120' => 4,
                        '4-7-60' => 3,
                        '4-7-180' => 1,
                        '4-8-0' => 2,
                        '4-8-120' => 2,
                        '4-8-60' => 1,
                        '4-8-180' => 1,
                        '4-9-0' => 5,
                        '4-9-120' => 4,
                        '4-9-60' => 3,
                        '4-9-180' => 1,
                        '4' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '4-90' => 1, // 与内环盘行星90度相位时

                        '2-0-0' => 14, // 权重加倍（最好的情况）
                        '2-0-120' => 6,
                        '2-0-60' => 5,
                        '2-0-180' => 2,
                        '2-1-0' => 5,
                        '2-1-120' => 4,
                        '2-1-60' => 3,
                        '2-1-180' => 1,
                        '2-2-0' => 6,
                        '2-2-120' => 5,
                        '2-2-60' => 4,
                        '2-2-180' => 1,
                        '2-3-0' => 14, // 权重加倍（最好的情况）
                        '2-3-120' => 6,
                        '2-3-60' => 4,
                        '2-3-180' => 2,
                        '2-4-0' => 7,
                        '2-4-120' => 6,
                        '2-4-60' => 5,
                        '2-4-180' => 1,
                        '2-5-0' => 7,
                        '2-5-120' => 6,
                        '2-5-60' => 5,
                        '2-5-180' => 2,
                        '2-6-0' => 2,
                        '2-6-120' => 2,
                        '2-6-60' => 1,
                        '2-6-180' => 1,
                        '2-7-0' => 2,
                        '2-7-120' => 2,
                        '2-7-60' => 1,
                        '2-7-180' => 1,
                        '2-8-0' => 4,
                        '2-8-120' => 3,
                        '2-8-60' => 1,
                        '2-8-180' => 1,
                        '2-9-0' => 4,
                        '2-9-120' => 3,
                        '2-9-60' => 2,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6
                    ],
                ];
                $score2 = $this->getQlzs($synastry, $confs2);
                // 计算利益拟合
                $confs3 = [
                    'first' => [
                        2 => 7,
                        8 => 6,
                        10 => 5,
                        7 => 4,
                        12 => 2,
                        6 => 1,
                    ],
                    'first_id' => [0, 3],
                    'first_base' => 3,
                    'phase' => [
                        '3-0-0' => 14, // 权重加倍（最好的情况）
                        '3-0-120' => 6,
                        '3-0-60' => 5,
                        '3-0-180' => 2,
                        '3-1-0' => 6,
                        '3-1-120' => 5,
                        '3-1-60' => 4,
                        '3-1-180' => 1,
                        '3-2-0' => 7,
                        '3-2-120' => 6,
                        '3-2-60' => 5,
                        '3-2-180' => 1,
                        '3-3-0' => 14, // 权重加倍（最好的情况）
                        '3-3-120' => 7,
                        '3-3-60' => 5,
                        '3-3-180' => 2,
                        '3-4-0' => 7,
                        '3-4-120' => 6,
                        '3-4-60' => 5,
                        '3-4-180' => 2,
                        '3-5-0' => 7,
                        '3-5-120' => 6,
                        '3-5-60' => 5,
                        '3-5-180' => 2,
                        '3-6-0' => 4,
                        '3-6-120' => 3,
                        '3-6-60' => 2,
                        '3-6-180' => 1,
                        '3-7-0' => 4,
                        '3-7-120' => 3,
                        '3-7-60' => 2,
                        '3-7-180' => 1,
                        '3-8-0' => 3,
                        '3-8-120' => 2,
                        '3-8-60' => 1,
                        '3-8-180' => 1,
                        '3-9-0' => 4,
                        '3-9-120' => 3,
                        '3-9-60' => 2,
                        '3-9-180' => 1,
                        '3' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '3-90' => 1, // 与内环盘行星90度相位时

                        '0-0-0' => 7,
                        '0-0-120' => 6,
                        '0-0-60' => 5,
                        '0-0-180' => 2,
                        '0-1-0' => 4,
                        '0-1-120' => 3,
                        '0-1-60' => 2,
                        '0-1-180' => 1,
                        '0-2-0' => 6,
                        '0-2-120' => 5,
                        '0-2-60' => 4,
                        '0-2-180' => 1,
                        '0-3-0' => 14, // 权重加倍（最好的情况）
                        '0-3-120' => 6,
                        '0-3-60' => 5,
                        '0-3-180' => 2,
                        '0-4-0' => 6,
                        '0-4-120' => 5,
                        '0-4-60' => 4,
                        '0-4-180' => 1,
                        '0-5-0' => 14, // 权重加倍（最好的情况）
                        '0-5-120' => 6,
                        '0-5-60' => 5,
                        '0-5-180' => 2,
                        '0-6-0' => 3,
                        '0-6-120' => 2,
                        '0-6-60' => 2,
                        '0-6-180' => 1,
                        '0-7-0' => 2,
                        '0-7-120' => 2,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 3,
                        '0-8-120' => 2,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 4,
                        '0-9-120' => 3,
                        '0-9-60' => 2,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6
                    ],
                ];
                $score3 = $this->getQlzs($synastry, $confs3);
                // 计算目标一致
                $confs4 = [
                    'first' => [
                        9 => 7,
                        3 => 6,
                        1 => 5,
                        10 => 4,
                        12 => 2,
                        8 => 1
                    ],
                    'first_id' => [0, 2],
                    'first_base' => 3,
                    'phase' => [
                        '0-0-0' => 14, // 权重加倍（最好的情况）
                        '0-0-120' => 6,
                        '0-0-60' => 5,
                        '0-0-180' => 2,
                        '0-1-0' => 6,
                        '0-1-120' => 5,
                        '0-1-60' => 4,
                        '0-1-180' => 1,
                        '0-2-0' => 14, // 权重加倍（最好的情况）
                        '0-2-120' => 6,
                        '0-2-60' => 5,
                        '0-2-180' => 1,
                        '0-3-0' => 6,
                        '0-3-120' => 5,
                        '0-3-60' => 4,
                        '0-3-180' => 1,
                        '0-4-0' => 6,
                        '0-4-120' => 5,
                        '0-4-60' => 4,
                        '0-4-180' => 2,
                        '0-5-0' => 6,
                        '0-5-120' => 5,
                        '0-5-60' => 4,
                        '0-5-180' => 2,
                        '0-6-0' => 2,
                        '0-6-120' => 3,
                        '0-6-60' => 1,
                        '0-6-180' => 1,
                        '0-7-0' => 2,
                        '0-7-120' => 3,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 2,
                        '0-8-120' => 3,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 2,
                        '0-9-120' => 3,
                        '0-9-60' => 1,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时

                        '2-0-0' => 14, // 权重加倍（最好的情况）
                        '2-0-120' => 6,
                        '2-0-60' => 5,
                        '2-0-180' => 2,
                        '2-1-0' => 6,
                        '2-1-120' => 5,
                        '2-1-60' => 4,
                        '2-1-180' => 1,
                        '2-2-0' => 14, // 权重加倍（最好的情况）
                        '2-2-120' => 6,
                        '2-2-60' => 5,
                        '2-2-180' => 2,
                        '2-3-0' => 5,
                        '2-3-120' => 3,
                        '2-3-60' => 2,
                        '2-3-180' => 1,
                        '2-4-0' => 5,
                        '2-4-120' => 3,
                        '2-4-60' => 2,
                        '2-4-180' => 1,
                        '2-5-0' => 5,
                        '2-5-120' => 3,
                        '2-5-60' => 2,
                        '2-5-180' => 1,
                        '2-6-0' => 2,
                        '2-6-120' => 3,
                        '2-6-60' => 1,
                        '2-6-180' => 1,
                        '2-7-0' => 2,
                        '2-7-120' => 3,
                        '2-7-60' => 1,
                        '2-7-180' => 1,
                        '2-8-0' => 2,
                        '2-8-120' => 3,
                        '2-8-60' => 1,
                        '2-8-180' => 1,
                        '2-9-0' => 2,
                        '2-9-120' => 3,
                        '2-9-60' => 1,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6
                    ],
                ];
                $score4 = $this->getQlzs($synastry, $confs4);
                // 计算信任支持
                $confs5 = [
                    'first' => [
                        4 => 7,
                        10 => 6,
                        7 => 5,
                        11 => 4,
                        12 => 2,
                        8 => 1
                    ],
                    'first_id' => [1, 4],
                    'first_base' => 3,
                    'phase' => [
                        '1-0-0' => 7,
                        '1-0-120' => 6,
                        '1-0-60' => 5,
                        '1-0-180' => 2,
                        '1-1-0' => 14, // 权重加倍（最好的情况）
                        '1-1-120' => 6,
                        '1-1-60' => 5,
                        '1-1-180' => 2,
                        '1-2-0' => 7,
                        '1-2-120' => 6,
                        '1-2-60' => 5,
                        '1-2-180' => 1,
                        '1-3-0' => 6,
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 2,
                        '1-4-0' => 6,
                        '1-4-120' => 14, // 权重加倍（最好的情况）
                        '1-4-60' => 5,
                        '1-4-180' => 2,
                        '1-5-0' => 6,
                        '1-5-120' => 5,
                        '1-5-60' => 4,
                        '1-5-180' => 2,
                        '1-6-0' => 2,
                        '1-6-120' => 3,
                        '1-6-60' => 1,
                        '1-6-180' => 1,
                        '1-7-0' => 2,
                        '1-7-120' => 3,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 2,
                        '1-8-120' => 3,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 2,
                        '1-9-120' => 3,
                        '1-9-60' => 1,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时

                        '4-0-0' => 7,
                        '4-0-120' => 6,
                        '4-0-60' => 5,
                        '4-0-180' => 2,
                        '4-1-0' => 14, // 权重加倍（最好的情况）
                        '4-1-120' => 6,
                        '4-1-60' => 5,
                        '4-1-180' => 2,
                        '4-2-0' => 5,
                        '4-2-120' => 4,
                        '4-2-60' => 2,
                        '4-2-180' => 1,
                        '4-3-0' => 6,
                        '4-3-120' => 5,
                        '4-3-60' => 4,
                        '4-3-180' => 2,
                        '4-4-0' => 6,
                        '4-4-120' => 14, // 权重加倍（最好的情况）
                        '4-4-60' => 5,
                        '4-4-180' => 1,
                        '4-5-0' => 6,
                        '4-5-120' => 5,
                        '4-5-60' => 4,
                        '4-5-180' => 2,
                        '4-6-0' => 2,
                        '4-6-120' => 3,
                        '4-6-60' => 1,
                        '4-6-180' => 1,
                        '4-7-0' => 2,
                        '4-7-120' => 3,
                        '4-7-60' => 1,
                        '4-7-180' => 1,
                        '4-8-0' => 2,
                        '4-8-120' => 3,
                        '4-8-60' => 1,
                        '4-8-180' => 1,
                        '4-9-0' => 2,
                        '4-9-120' => 3,
                        '4-9-60' => 1,
                        '4-9-180' => 1,
                        '4' => 2, // 与内环盘行星无相位及未提及的相位时
                        '4-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6
                    ],
                ];
                $score5 = $this->getQlzs($synastry, $confs5);
                // 计算沟通交流
                $confs6 = [
                    'first' => [
                        3 => 7,
                        9 => 6,
                        6 => 5,
                        11 => 4,
                        12 => 2,
                        8 => 1
                    ],
                    'first_id' => [1, 2],
                    'first_base' => 3,
                    'phase' => [
                        '1-0-0' => 7,
                        '1-0-120' => 6,
                        '1-0-60' => 5,
                        '1-0-180' => 2,
                        '1-1-0' => 14, // 权重加倍（最好的情况）
                        '1-1-120' => 7,
                        '1-1-60' => 5,
                        '1-1-180' => 2,
                        '1-2-0' => 6,
                        '1-2-120' => 14, // 权重加倍（最好的情况）
                        '1-2-60' => 5,
                        '1-2-180' => 2,
                        '1-3-0' => 6,
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 2,
                        '1-4-0' => 6,
                        '1-4-120' => 5,
                        '1-4-60' => 4,
                        '1-4-180' => 2,
                        '1-5-0' => 6,
                        '1-5-120' => 5,
                        '1-5-60' => 4,
                        '1-5-180' => 2,
                        '1-6-0' => 2,
                        '1-6-120' => 3,
                        '1-6-60' => 1,
                        '1-6-180' => 1,
                        '1-7-0' => 2,
                        '1-7-120' => 3,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 2,
                        '1-8-120' => 3,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 2,
                        '1-9-120' => 3,
                        '1-9-60' => 1,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时

                        '2-0-0' => 7,
                        '2-0-120' => 6,
                        '2-0-60' => 5,
                        '2-0-180' => 2,
                        '2-1-0' => 14, // 权重加倍（最好的情况）
                        '2-1-120' => 6,
                        '2-1-60' => 5,
                        '2-1-180' => 2,
                        '2-2-0' => 6,
                        '2-2-120' => 14, // 权重加倍（最好的情况）
                        '2-2-60' => 5,
                        '2-2-180' => 2,
                        '2-3-0' => 6,
                        '2-3-120' => 5,
                        '2-3-60' => 4,
                        '2-3-180' => 2,
                        '2-4-0' => 6,
                        '2-4-120' => 7,
                        '2-4-60' => 5,
                        '2-4-180' => 1,
                        '2-5-0' => 6,
                        '2-5-120' => 5,
                        '2-5-60' => 4,
                        '2-5-180' => 2,
                        '2-6-0' => 2,
                        '2-6-120' => 3,
                        '2-6-60' => 1,
                        '2-6-180' => 1,
                        '2-7-0' => 2,
                        '2-7-120' => 3,
                        '2-7-60' => 1,
                        '2-7-180' => 1,
                        '2-8-0' => 2,
                        '2-8-120' => 3,
                        '2-8-60' => 1,
                        '2-8-180' => 1,
                        '2-9-0' => 2,
                        '2-9-120' => 3,
                        '2-9-60' => 1,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6
                    ],
                ];
                $score6 = $this->getQlzs($synastry, $confs6);

                // 计算相处预判  组合盘 事业：初识、初步合作、并肩作战、内心感受
                $confs7 = [
                    'pids' => [17, 0],
                    'signs' => [
                        '17-1' => 20,
                        '17-2' => 80,
                        '17-3' => 60,
                        '17-4' => 80,
                        '17-5' => 100,
                        '17-6' => 60,
                        '17-7' => 80,
                        '17-8' => 20,
                        '17-9' => 100,
                        '17-10' => 20,
                        '17-11' => 20,
                        '17-12' => 100,

                        '0-1' => 80,
                        '0-2' => 100,
                        '0-3' => 60,
                        '0-4' => 60,
                        '0-5' => 100,
                        '0-6' => 60,
                        '0-7' => 20,
                        '0-8' => 60,
                        '0-9' => 60,
                        '0-10' => 60,
                        '0-11' => 40,
                        '0-12' => 60,
                    ],
                ];
                // 初识
                $score7 = $this->getXcyp($composite, $confs7);
                $confs8 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'houses' => [
                        '0-1' => 40,
                        '0-2' => 80,
                        '0-3' => 40,
                        '0-4' => 60,
                        '0-5' => 60,
                        '0-6' => 80,
                        '0-7' => 80,
                        '0-8' => 20,
                        '0-9' => 60,
                        '0-10' => 100,
                        '0-11' => 100,
                        '0-12' => 80,

                        '1-1' => 40,
                        '1-2' => 80,
                        '1-3' => 40,
                        '1-4' => 60,
                        '1-5' => 60,
                        '1-6' => 80,
                        '1-7' => 80,
                        '1-8' => 20,
                        '1-9' => 60,
                        '1-10' => 100,
                        '1-11' => 100,
                        '1-12' => 20,

                        '2-1' => 20,
                        '2-2' => 80,
                        '2-3' => 100,
                        '2-4' => 40,
                        '2-5' => 60,
                        '2-6' => 80,
                        '2-7' => 80,
                        '2-8' => 20,
                        '2-9' => 80,
                        '2-10' => 100,
                        '2-11' => 80,
                        '2-12' => 20,

                        '3-1' => 40,
                        '3-2' => 80,
                        '3-3' => 40,
                        '3-4' => 60,
                        '3-5' => 60,
                        '3-6' => 60,
                        '3-7' => 80,
                        '3-8' => 20,
                        '3-9' => 60,
                        '3-10' => 100,
                        '3-11' => 80,
                        '3-12' => 20,

                        '4-1' => 40,
                        '4-2' => 80,
                        '4-3' => 60,
                        '4-4' => 80,
                        '4-5' => 40,
                        '4-6' => 60,
                        '4-7' => 100,
                        '4-8' => 20,
                        '4-9' => 80,
                        '4-10' => 100,
                        '4-11' => 100,
                        '4-12' => 20,
                    ],
                ];
                // 初步合作
                $score8 = $this->getXcyp($composite, $confs8);
                $confs9 = [
                    'pids' => [19, 1],
                    'signs' => [
                        '19-1' => 20,
                        '19-2' => 80,
                        '19-3' => 60,
                        '19-4' => 80,
                        '19-5' => 40,
                        '19-6' => 60,
                        '19-7' => 100,
                        '19-8' => 20,
                        '19-9' => 80,
                        '19-10' => 40,
                        '19-11' => 60,
                        '19-12' => 60,

                        '1-1' => 20,
                        '1-2' => 100,
                        '1-3' => 80,
                        '1-4' => 100,
                        '1-5' => 60,
                        '1-6' => 40,
                        '1-7' => 100,
                        '1-8' => 20,
                        '1-9' => 80,
                        '1-10' => 20,
                        '1-11' => 40,
                        '1-12' => 40,
                    ],
                ];
                // 并肩作战
                $score9 = $this->getXcyp($composite, $confs9);
                $confs10 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'signs' => [
                        '0-1' => 100,
                        '0-2' => 80,
                        '0-3' => 60,
                        '0-4' => 40,
                        '0-5' => 100,
                        '0-6' => 40,
                        '0-7' => 20,
                        '0-8' => 40,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 20,
                        '0-12' => 60,

                        '1-1' => 40,
                        '1-2' => 100,
                        '1-3' => 60,
                        '1-4' => 100,
                        '1-5' => 60,
                        '1-6' => 40,
                        '1-7' => 40,
                        '1-8' => 20,
                        '1-9' => 80,
                        '1-10' => 20,
                        '1-11' => 20,
                        '1-12' => 80,

                        '2-1' => 60,
                        '2-2' => 60,
                        '2-3' => 100,
                        '2-4' => 60,
                        '2-5' => 20,
                        '2-6' => 100,
                        '2-7' => 60,
                        '2-8' => 60,
                        '2-9' => 40,
                        '2-10' => 60,
                        '2-11' => 80,
                        '2-12' => 40,

                        '3-1' => 40,
                        '3-2' => 100,
                        '3-3' => 60,
                        '3-4' => 60,
                        '3-5' => 60,
                        '3-6' => 20,
                        '3-7' => 100,
                        '3-8' => 40,
                        '3-9' => 60,
                        '3-10' => 60,
                        '3-11' => 60,
                        '3-12' => 80,

                        '4-1' => 100,
                        '4-2' => 40,
                        '4-3' => 60,
                        '4-4' => 20,
                        '4-5' => 100,
                        '4-6' => 40,
                        '4-7' => 40,
                        '4-8' => 100,
                        '4-9' => 80,
                        '4-10' => 80,
                        '4-11' => 20,
                        '4-12' => 60,
                    ],
                ];
                // 内心感受
                $score10 = $this->getXcyp($composite, $confs10);

                // 计算合作压力比较 比较盘
                $isSame = $synastry[0]['planets'][6]['in_house_id'] === $natal2['planets'][6]['in_house_id'];
                $confs11 = [
                    'is_same' => $isSame, // 两人的水星落宫是否相同
                    'pid' => 6,
                    'houses' => [
                        1 => 60,
                        2 => 40,
                        3 => 90,
                        4 => 30,
                        5 => 40,
                        6 => 80,
                        7 => 70,
                        8 => 30,
                        9 => 70,
                        10 => 80,
                        11 => 50,
                        12 => 10,
                    ],
                    'phases' => [
                        '0-6' => 40,
                        '1-6' => 30,
                        '2-6' => 40,
                        '3-6' => 20,
                        '4-6' => 30,
                    ],
                ];
                $score11 = $this->getBj(1, $synastry, $confs11);
                break;
            case 11:
                // 计算朋友潜力指数
                // 朋友：共同兴趣、信任支持、倾听沟通、共同进步、真实坦诚、密切程度
                $confs1 = [
                    'first' => [
                        3 => 7,
                        5 => 6,
                        9 => 5,
                        11 => 4,
                        12 => 2,
                        8 => 1,
                    ],
                    'first_id' => [3, 4],
                    'first_base' => 3,
                    'phase' => [
                        '3-0-0' => 14, // 权重加倍（最好的情况）
                        '3-0-120' => 7,
                        '3-0-60' => 6,
                        '3-0-180' => 2,
                        '3-1-0' => 7,
                        '3-1-120' => 6,
                        '3-1-60' => 5,
                        '3-1-180' => 2,
                        '3-2-0' => 7,
                        '3-2-120' => 6,
                        '3-2-60' => 5,
                        '3-2-180' => 1,
                        '3-3-0' => 14, // 权重加倍（最好的情况）
                        '3-3-120' => 6,
                        '3-3-60' => 5,
                        '3-3-180' => 2,
                        '3-4-0' => 7,
                        '3-4-120' => 6,
                        '3-4-60' => 6,
                        '3-4-180' => 2,
                        '3-5-0' => 7,
                        '3-5-120' => 6,
                        '3-5-60' => 5,
                        '3-5-180' => 2,
                        '3-6-0' => 3,
                        '3-6-120' => 2,
                        '3-6-60' => 1,
                        '3-6-180' => 1,
                        '3-7-0' => 4,
                        '3-7-120' => 3,
                        '3-7-60' => 2,
                        '3-7-180' => 1,
                        '3-8-0' => 2,
                        '3-8-120' => 2,
                        '3-8-60' => 1,
                        '3-8-180' => 1,
                        '3-9-0' => 4,
                        '3-9-120' => 3,
                        '3-9-60' => 2,
                        '3-9-180' => 1,
                        '3' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '3-90' => 1, // 与内环盘行星90度相位时

                        '4-0-0' => 14, // 权重加倍（最好的情况）
                        '4-0-120' => 6,
                        '4-0-60' => 5,
                        '4-0-180' => 2,
                        '4-1-0' => 6,
                        '4-1-120' => 5,
                        '4-1-60' => 4,
                        '4-1-180' => 1,
                        '4-2-0' => 5,
                        '4-2-120' => 4,
                        '4-2-60' => 3,
                        '4-2-180' => 1,
                        '4-3-0' => 14, // 权重加倍（最好的情况）
                        '4-3-120' => 6,
                        '4-3-60' => 5,
                        '4-3-180' => 2,
                        '4-4-0' => 7,
                        '4-4-120' => 6,
                        '4-4-60' => 5,
                        '4-4-180' => 2,
                        '4-5-0' => 7,
                        '4-5-120' => 6,
                        '4-5-60' => 5,
                        '4-5-180' => 2,
                        '4-6-0' => 2,
                        '4-6-120' => 2,
                        '4-6-60' => 1,
                        '4-6-180' => 1,
                        '4-7-0' => 3,
                        '4-7-120' => 2,
                        '4-7-60' => 1,
                        '4-7-180' => 1,
                        '4-8-0' => 2,
                        '4-8-120' => 2,
                        '4-8-60' => 1,
                        '4-8-180' => 1,
                        '4-9-0' => 3,
                        '4-9-120' => 2,
                        '4-9-60' => 1,
                        '4-9-180' => 1,
                        '4' => 2, // 与内环盘行星无相位及未提及的相位时
                        '4-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                // 计算共同兴趣得分
                $score1 = $this->getQlzs($synastry, $confs1);
                // 计算信任支持
                $confs2 = [
                    'first' => [
                        7 => 7,
                        4 => 6,
                        11 => 5,
                        10 => 4,
                        12 => 2,
                        8 => 1,
                    ],
                    'first_id' => [1, 4],
                    'first_base' => 3,
                    'phase' => [
                        '1-0-0' => 7,
                        '1-0-120' => 6,
                        '1-0-60' => 6,
                        '1-0-180' => 2,
                        '1-1-0' => 14, // 权重加倍（最好的情况）
                        '1-1-120' => 7,
                        '1-1-60' => 5,
                        '1-1-180' => 2,
                        '1-2-0' => 14, // 权重加倍（最好的情况）
                        '1-2-120' => 6,
                        '1-2-60' => 5,
                        '1-2-180' => 1,
                        '1-3-0' => 7,
                        '1-3-120' => 6,
                        '1-3-60' => 5,
                        '1-3-180' => 2,
                        '1-4-0' => 7,
                        '1-4-120' => 6,
                        '1-4-60' => 5,
                        '1-4-180' => 2,
                        '1-5-0' => 7,
                        '1-5-120' => 6,
                        '1-5-60' => 5,
                        '1-5-180' => 2,
                        '1-6-0' => 4,
                        '1-6-120' => 5,
                        '1-6-60' => 4,
                        '1-6-180' => 1,
                        '1-7-0' => 4,
                        '1-7-120' => 3,
                        '1-7-60' => 2,
                        '1-7-180' => 1,
                        '1-8-0' => 3,
                        '1-8-120' => 2,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 4,
                        '1-9-120' => 3,
                        '1-9-60' => 2,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时

                        '4-0-0' => 14, // 权重加倍（最好的情况）
                        '4-0-120' => 6,
                        '4-0-60' => 5,
                        '4-0-180' => 2,
                        '4-1-0' => 6,
                        '4-1-120' => 5,
                        '4-1-60' => 4,
                        '4-1-180' => 1,
                        '4-2-0' => 14, // 权重加倍（最好的情况）
                        '4-2-120' => 6,
                        '4-2-60' => 5,
                        '4-2-180' => 2,
                        '4-3-0' => 6,
                        '4-3-120' => 5,
                        '4-3-60' => 4,
                        '4-3-180' => 2,
                        '4-4-0' => 7,
                        '4-4-120' => 6,
                        '4-4-60' => 5,
                        '4-4-180' => 2,
                        '4-5-0' => 7,
                        '4-5-120' => 6,
                        '4-5-60' => 5,
                        '4-5-180' => 2,
                        '4-6-0' => 2,
                        '4-6-120' => 2,
                        '4-6-60' => 1,
                        '4-6-180' => 1,
                        '4-7-0' => 3,
                        '4-7-120' => 2,
                        '4-7-60' => 1,
                        '4-7-180' => 1,
                        '4-8-0' => 2,
                        '4-8-120' => 2,
                        '4-8-60' => 1,
                        '4-8-180' => 1,
                        '4-9-0' => 4,
                        '4-9-120' => 3,
                        '4-9-60' => 2,
                        '4-9-180' => 1,
                        '4' => 2, // 与内环盘行星无相位及未提及的相位时
                        '4-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score2 = $this->getQlzs($synastry, $confs2);
                // 计算倾听沟通
                $confs3 = [
                    'first' => [
                        3 => 7,
                        9 => 6,
                        7 => 5,
                        11 => 4,
                        12 => 2,
                        8 => 1,
                    ],
                    'first_id' => [1, 2],
                    'first_base' => 3,
                    'phase' => [
                        '2-0-0' => 7,
                        '2-0-120' => 6,
                        '2-0-60' => 6,
                        '2-0-180' => 2,
                        '2-1-0' => 14, // 权重加倍（最好的情况）
                        '2-1-120' => 7,
                        '2-1-60' => 5,
                        '2-1-180' => 2,
                        '2-2-0' => 14, // 权重加倍（最好的情况）
                        '2-2-120' => 7,
                        '2-2-60' => 5,
                        '2-2-180' => 1,
                        '2-3-0' => 7,
                        '2-3-120' => 6,
                        '2-3-60' => 5,
                        '2-3-180' => 2,
                        '2-4-0' => 6,
                        '2-4-120' => 5,
                        '2-4-60' => 4,
                        '2-4-180' => 2,
                        '2-5-0' => 7,
                        '2-5-120' => 6,
                        '2-5-60' => 5,
                        '2-5-180' => 2,
                        '2-6-0' => 4,
                        '2-6-120' => 5,
                        '2-6-60' => 4,
                        '2-6-180' => 1,
                        '2-7-0' => 5,
                        '2-7-120' => 4,
                        '2-7-60' => 3,
                        '2-7-180' => 1,
                        '2-8-0' => 4,
                        '2-8-120' => 3,
                        '2-8-60' => 2,
                        '2-8-180' => 2,
                        '2-9-0' => 4,
                        '2-9-120' => 3,
                        '2-9-60' => 2,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时

                        '1-0-0' => 7,
                        '1-0-120' => 6,
                        '1-0-60' => 5,
                        '1-0-180' => 2,
                        '1-1-0' => 14, // 权重加倍（最好的情况）
                        '1-1-120' => 7,
                        '1-1-60' => 4,
                        '1-1-180' => 1,
                        '1-2-0' => 14, // 权重加倍（最好的情况）
                        '1-2-120' => 6,
                        '1-2-60' => 5,
                        '1-2-180' => 2,
                        '1-3-0' => 6,
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 2,
                        '1-4-0' => 7,
                        '1-4-120' => 6,
                        '1-4-60' => 5,
                        '1-4-180' => 2,
                        '1-5-0' => 7,
                        '1-5-120' => 6,
                        '1-5-60' => 5,
                        '1-5-180' => 2,
                        '1-6-0' => 3,
                        '1-6-120' => 2,
                        '1-6-60' => 1,
                        '1-6-180' => 1,
                        '1-7-0' => 3,
                        '1-7-120' => 2,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 3,
                        '1-8-120' => 2,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 3,
                        '1-9-120' => 2,
                        '1-9-60' => 1,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score3 = $this->getQlzs($synastry, $confs3);
                // 计算共同进步
                $confs4 = [
                    'first' => [
                        10 => 7,
                        9 => 6,
                        11 => 5,
                        3 => 4,
                        12 => 2,
                        6 => 1
                    ],
                    'first_id' => [0, 1],
                    'first_base' => 3,
                    'phase' => [
                        '0-0-0' => 14, // 权重加倍（最好的情况）
                        '0-0-120' => 6,
                        '0-0-60' => 5,
                        '0-0-180' => 2,
                        '0-1-0' => 14, // 权重加倍（最好的情况）
                        '0-1-120' => 6,
                        '0-1-60' => 5,
                        '0-1-180' => 2,
                        '0-2-0' => 7,
                        '0-2-120' => 6,
                        '0-2-60' => 5,
                        '0-2-180' => 1,
                        '0-3-0' => 6,
                        '0-3-120' => 5,
                        '0-3-60' => 4,
                        '0-3-180' => 2,
                        '0-4-0' => 4,
                        '0-4-120' => 5,
                        '0-4-60' => 2,
                        '0-4-180' => 1,
                        '0-5-0' => 6,
                        '0-5-120' => 5,
                        '0-5-60' => 4,
                        '0-5-180' => 2,
                        '0-6-0' => 2,
                        '0-6-120' => 3,
                        '0-6-60' => 1,
                        '0-6-180' => 1,
                        '0-7-0' => 2,
                        '0-7-120' => 3,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 2,
                        '0-8-120' => 3,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 2,
                        '0-9-120' => 3,
                        '0-9-60' => 1,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时

                        '1-0-0' => 14, // 权重加倍（最好的情况）
                        '1-0-120' => 6,
                        '1-0-60' => 5,
                        '1-0-180' => 2,
                        '1-1-0' => 14, // 权重加倍（最好的情况）
                        '1-1-120' => 6,
                        '1-1-60' => 5,
                        '1-1-180' => 2,
                        '1-2-0' => 5,
                        '1-2-120' => 4,
                        '1-2-60' => 2,
                        '1-2-180' => 1,
                        '1-3-0' => 6,
                        '1-3-120' => 5,
                        '1-3-60' => 4,
                        '1-3-180' => 2,
                        '1-4-0' => 6,
                        '1-4-120' => 7,
                        '1-4-60' => 5,
                        '1-4-180' => 1,
                        '1-5-0' => 6,
                        '1-5-120' => 5,
                        '1-5-60' => 4,
                        '1-5-180' => 2,
                        '1-6-0' => 2,
                        '1-6-120' => 3,
                        '1-6-60' => 1,
                        '1-6-180' => 1,
                        '1-7-0' => 2,
                        '1-7-120' => 3,
                        '1-7-60' => 1,
                        '1-7-180' => 1,
                        '1-8-0' => 2,
                        '1-8-120' => 3,
                        '1-8-60' => 1,
                        '1-8-180' => 1,
                        '1-9-0' => 2,
                        '1-9-120' => 3,
                        '1-9-60' => 1,
                        '1-9-180' => 1,
                        '1' => 2, // 与内环盘行星无相位及未提及的相位时
                        '1-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score4 = $this->getQlzs($synastry, $confs4);
                // 计算真实坦诚
                $confs5 = [
                    'first' => [
                        4 => 7,
                        7 => 6,
                        11 => 5,
                        5 => 4,
                        12 => 2,
                        8 => 1
                    ],
                    'first_id' => [2, 3],
                    'first_base' => 3,
                    'phase' => [
                        '2-0-0' => 7,
                        '2-0-120' => 6,
                        '2-0-60' => 5,
                        '2-0-180' => 2,
                        '2-1-0' => 7,
                        '2-1-120' => 6,
                        '2-1-60' => 5,
                        '2-1-180' => 2,
                        '2-2-0' => 6,
                        '2-2-120' => 14, // 权重加倍（最好的情况）
                        '2-2-60' => 5,
                        '2-2-180' => 1,
                        '2-3-0' => 14, // 权重加倍（最好的情况）
                        '2-3-120' => 6,
                        '2-3-60' => 5,
                        '2-3-180' => 2,
                        '2-4-0' => 4,
                        '2-4-120' => 5,
                        '2-4-60' => 2,
                        '2-4-180' => 1,
                        '2-5-0' => 6,
                        '2-5-120' => 5,
                        '2-5-60' => 4,
                        '2-5-180' => 2,
                        '2-6-0' => 2,
                        '2-6-120' => 3,
                        '2-6-60' => 1,
                        '2-6-180' => 1,
                        '2-7-0' => 2,
                        '2-7-120' => 3,
                        '2-7-60' => 1,
                        '2-7-180' => 1,
                        '2-8-0' => 2,
                        '2-8-120' => 3,
                        '2-8-60' => 1,
                        '2-8-180' => 1,
                        '2-9-0' => 2,
                        '2-9-120' => 3,
                        '2-9-60' => 1,
                        '2-9-180' => 1,
                        '2' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '2-90' => 1, // 与内环盘行星90度相位时

                        '3-0-0' => 7,
                        '3-0-120' => 6,
                        '3-0-60' => 5,
                        '3-0-180' => 2,
                        '3-1-0' => 7,
                        '3-1-120' => 6,
                        '3-1-60' => 5,
                        '3-1-180' => 2,
                        '3-2-0' => 6,
                        '3-2-120' => 14, // 权重加倍（最好的情况）
                        '3-2-60' => 5,
                        '3-2-180' => 2,
                        '3-3-0' => 14, // 权重加倍（最好的情况）
                        '3-3-120' => 5,
                        '3-3-60' => 4,
                        '3-3-180' => 2,
                        '3-4-0' => 4,
                        '3-4-120' => 5,
                        '3-4-60' => 2,
                        '3-4-180' => 1,
                        '3-5-0' => 6,
                        '3-5-120' => 5,
                        '3-5-60' => 4,
                        '3-5-180' => 2,
                        '3-6-0' => 2,
                        '3-6-120' => 3,
                        '3-6-60' => 1,
                        '3-6-180' => 1,
                        '3-7-0' => 2,
                        '3-7-120' => 3,
                        '3-7-60' => 1,
                        '3-7-180' => 1,
                        '3-8-0' => 2,
                        '3-8-120' => 3,
                        '3-8-60' => 1,
                        '3-8-180' => 1,
                        '3-9-0' => 2,
                        '3-9-120' => 3,
                        '3-9-60' => 1,
                        '3-9-180' => 1,
                        '3' => 2, // 与内环盘行星无相位及未提及的相位时
                        '3-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score5 = $this->getQlzs($synastry, $confs5);
                // 计算密切程度
                $confs6 = [
                    'first' => [
                        7 => 7,
                        4 => 6,
                        11 => 5,
                        5 => 4,
                        12 => 2,
                        8 => 1
                    ],
                    'first_id' => [0, 4],
                    'first_base' => 3,
                    'phase' => [
                        '4-0-0' => 14, // 权重加倍（最好的情况）
                        '4-0-120' => 6,
                        '4-0-60' => 5,
                        '4-0-180' => 2,
                        '4-1-0' => 7,
                        '4-1-120' => 6,
                        '4-1-60' => 5,
                        '4-1-180' => 2,
                        '4-2-0' => 4,
                        '4-2-120' => 5,
                        '4-2-60' => 3,
                        '4-2-180' => 1,
                        '4-3-0' => 14, // 权重加倍（最好的情况）
                        '4-3-120' => 6,
                        '4-3-60' => 5,
                        '4-3-180' => 2,
                        '4-4-0' => 4,
                        '4-4-120' => 7,
                        '4-4-60' => 5,
                        '4-4-180' => 1,
                        '4-5-0' => 6,
                        '4-5-120' => 5,
                        '4-5-60' => 4,
                        '4-5-180' => 2,
                        '4-6-0' => 2,
                        '4-6-120' => 3,
                        '4-6-60' => 1,
                        '4-6-180' => 1,
                        '4-7-0' => 2,
                        '4-7-120' => 3,
                        '4-7-60' => 1,
                        '4-7-180' => 1,
                        '4-8-0' => 2,
                        '4-8-120' => 3,
                        '4-8-60' => 1,
                        '4-8-180' => 1,
                        '4-9-0' => 2,
                        '4-9-120' => 3,
                        '4-9-60' => 1,
                        '4-9-180' => 1,
                        '4' => 2, // 与内环盘行星无相位及有未提及的相位时
                        '4-90' => 1, // 与内环盘行星90度相位时

                        '0-0-0' => 14, // 权重加倍（最好的情况）
                        '0-0-120' => 6,
                        '0-0-60' => 5,
                        '0-0-180' => 2,
                        '0-1-0' => 7,
                        '0-1-120' => 6,
                        '0-1-60' => 5,
                        '0-1-180' => 2,
                        '0-2-0' => 6,
                        '0-2-120' => 7,
                        '0-2-60' => 5,
                        '0-2-180' => 2,
                        '0-3-0' => 6,
                        '0-3-120' => 5,
                        '0-3-60' => 4,
                        '0-3-180' => 2,
                        '0-4-0' => 4,
                        '0-4-120' => 14, // 权重加倍（最好的情况）
                        '0-4-60' => 5,
                        '0-4-180' => 1,
                        '0-5-0' => 6,
                        '0-5-120' => 5,
                        '0-5-60' => 4,
                        '0-5-180' => 2,
                        '0-6-0' => 2,
                        '0-6-120' => 3,
                        '0-6-60' => 1,
                        '0-6-180' => 1,
                        '0-7-0' => 2,
                        '0-7-120' => 3,
                        '0-7-60' => 1,
                        '0-7-180' => 1,
                        '0-8-0' => 2,
                        '0-8-120' => 3,
                        '0-8-60' => 1,
                        '0-8-180' => 1,
                        '0-9-0' => 2,
                        '0-9-120' => 3,
                        '0-9-60' => 1,
                        '0-9-180' => 1,
                        '0' => 2, // 与内环盘行星无相位及未提及的相位时
                        '0-90' => 1, // 与内环盘行星90度相位时
                    ],
                    'extra' => [
                        0 => 6,
                        1 => 6,
                        17 => 6,
                    ],
                ];
                $score6 = $this->getQlzs($synastry, $confs6);

                // 计算相处预判 组合盘 朋友：初识、普通朋友、闺蜜哥们、内心感受
                $confs7 = [
                    'pids' => [17, 0],
                    'signs' => [
                        '17-1' => 20,
                        '17-2' => 80,
                        '17-3' => 60,
                        '17-4' => 80,
                        '17-5' => 100,
                        '17-6' => 60,
                        '17-7' => 80,
                        '17-8' => 20,
                        '17-9' => 100,
                        '17-10' => 20,
                        '17-11' => 20,
                        '17-12' => 100,

                        '0-1' => 80,
                        '0-2' => 100,
                        '0-3' => 60,
                        '0-4' => 60,
                        '0-5' => 100,
                        '0-6' => 60,
                        '0-7' => 20,
                        '0-8' => 60,
                        '0-9' => 60,
                        '0-10' => 60,
                        '0-11' => 40,
                        '0-12' => 60,
                    ],
                ];
                // 初识
                $score7 = $this->getXcyp($composite, $confs7);
                $confs8 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'houses' => [
                        '0-1' => 40,
                        '0-2' => 40,
                        '0-3' => 40,
                        '0-4' => 60,
                        '0-5' => 100,
                        '0-6' => 20,
                        '0-7' => 80,
                        '0-8' => 20,
                        '0-9' => 60,
                        '0-10' => 100,
                        '0-11' => 100,
                        '0-12' => 20,

                        '1-1' => 40,
                        '1-2' => 80,
                        '1-3' => 40,
                        '1-4' => 60,
                        '1-5' => 60,
                        '1-6' => 80,
                        '1-7' => 80,
                        '1-8' => 20,
                        '1-9' => 60,
                        '1-10' => 100,
                        '1-11' => 100,
                        '1-12' => 20,

                        '2-1' => 20,
                        '2-2' => 80,
                        '2-3' => 100,
                        '2-4' => 40,
                        '2-5' => 60,
                        '2-6' => 80,
                        '2-7' => 80,
                        '2-8' => 20,
                        '2-9' => 80,
                        '2-10' => 100,
                        '2-11' => 80,
                        '2-12' => 20,

                        '3-1' => 40,
                        '3-2' => 80,
                        '3-3' => 40,
                        '3-4' => 60,
                        '3-5' => 60,
                        '3-6' => 60,
                        '3-7' => 80,
                        '3-8' => 20,
                        '3-9' => 60,
                        '3-10' => 100,
                        '3-11' => 80,
                        '3-12' => 20,

                        '4-1' => 40,
                        '4-2' => 80,
                        '4-3' => 60,
                        '4-4' => 80,
                        '4-5' => 40,
                        '4-6' => 60,
                        '4-7' => 100,
                        '4-8' => 20,
                        '4-9' => 80,
                        '4-10' => 100,
                        '4-11' => 100,
                        '4-12' => 20,
                    ],
                ];
                // 普通朋友
                $score8 = $this->getXcyp($composite, $confs8);
                $confs9 = [
                    'pids' => [19, 1],
                    'signs' => [
                        '19-1' => 20,
                        '19-2' => 80,
                        '19-3' => 60,
                        '19-4' => 80,
                        '19-5' => 100,
                        '19-6' => 60,
                        '19-7' => 80,
                        '19-8' => 20,
                        '19-9' => 100,
                        '19-10' => 20,
                        '19-11' => 20,
                        '19-12' => 100,

                        '1-1' => 20,
                        '1-2' => 80,
                        '1-3' => 80,
                        '1-4' => 100,
                        '1-5' => 60,
                        '1-6' => 40,
                        '1-7' => 100,
                        '1-8' => 20,
                        '1-9' => 60,
                        '1-10' => 40,
                        '1-11' => 60,
                        '1-12' => 60,
                    ],
                ];
                // 闺蜜哥们
                $score9 = $this->getXcyp($composite, $confs9);
                $confs10 = [
                    'pids' => [0, 1, 2, 3, 4],
                    'signs' => [
                        '0-1' => 100,
                        '0-2' => 80,
                        '0-3' => 60,
                        '0-4' => 40,
                        '0-5' => 100,
                        '0-6' => 40,
                        '0-7' => 20,
                        '0-8' => 40,
                        '0-9' => 80,
                        '0-10' => 60,
                        '0-11' => 20,
                        '0-12' => 60,

                        '1-1' => 40,
                        '1-2' => 100,
                        '1-3' => 60,
                        '1-4' => 100,
                        '1-5' => 60,
                        '1-6' => 40,
                        '1-7' => 40,
                        '1-8' => 20,
                        '1-9' => 80,
                        '1-10' => 20,
                        '1-11' => 20,
                        '1-12' => 80,

                        '2-1' => 60,
                        '2-2' => 60,
                        '2-3' => 100,
                        '2-4' => 60,
                        '2-5' => 20,
                        '2-6' => 100,
                        '2-7' => 60,
                        '2-8' => 60,
                        '2-9' => 40,
                        '2-10' => 60,
                        '2-11' => 80,
                        '2-12' => 40,

                        '3-1' => 40,
                        '3-2' => 100,
                        '3-3' => 60,
                        '3-4' => 60,
                        '3-5' => 60,
                        '3-6' => 20,
                        '3-7' => 100,
                        '3-8' => 40,
                        '3-9' => 60,
                        '3-10' => 60,
                        '3-11' => 60,
                        '3-12' => 80,

                        '4-1' => 100,
                        '4-2' => 40,
                        '4-3' => 60,
                        '4-4' => 20,
                        '4-5' => 100,
                        '4-6' => 40,
                        '4-7' => 40,
                        '4-8' => 100,
                        '4-9' => 80,
                        '4-10' => 80,
                        '4-11' => 20,
                        '4-12' => 60,
                    ],
                ];
                // 内心感受
                $score10 = $this->getXcyp($composite, $confs10);

                // 计算收获成长比较 比较盘
                $isSame = $synastry[0]['planets'][2]['in_house_id'] === $natal2['planets'][2]['in_house_id'];
                $confs11 = [
                    'is_same' => $isSame, // 两人的水星落宫是否相同
                    'pid' => 2,
                    'houses' => [
                        1 => 40,
                        2 => 30,
                        3 => 90,
                        4 => 70,
                        5 => 60,
                        6 => 20,
                        7 => 80,
                        8 => 10,
                        9 => 90,
                        10 => 80,
                        11 => 40,
                        12 => 10,
                    ],
                    'phases' => [
                        '0-2' => 50,
                        '1-2' => 40,
                        '2-2' => 30,
                        '3-2' => 20,
                        '4-2' => 10,
                    ],
                ];
                $score11 = $this->getBj(1, $synastry, $confs11);

                break;
            default:
                $score1 = 0;
                $score2 = 0;
                $score3 = 0;
                $score4 = 0;
                $score5 = 0;
                $score6 = 0;
                $score7 = 0;
                $score8 = 0;
                $score9 = 0;
                $score10 = 0;
                $score11 = 0;
                break;
        }
        $scores = [
            $score1,
            $score2,
            $score3,
            $score4,
            $score5,
            $score6,
            $score7,
            $score8,
            $score9,
            $score10,
            $score11,
        ];
        return $scores;
    }

    /**
     * 计算潜力指数
     *  婚姻：尊重信任、支持理解、事业财富、共同目标、妥协忍让、性和谐
     *  恋爱：尊重信任、支持理解、互相依赖、共同兴趣、沟通、亲密
     *  事业：互相成就、团队协作、利益拟合、目标一致、信任支持、沟通交流
     *  朋友：共同兴趣、信任支持、倾听沟通、共同进步、真实坦诚、密切程度
     * @param $astroData
     * @param $confs array 参数配置
     *  first 整体权重落宫
     *  first_id 整体权重星体
     *  first_base 整体权重默认分
     *  phase 整体权重相位分
     * @return int
     */
    protected function getQlzs($astroData, $confs)
    {
        // $astro0 => 内盘, $astro1 => 外环盘
        list($astro0, $astro1) = $astroData;

        // 获取整体权重
        $score = $confs['first_base'];
        foreach ($confs['first'] as $k => $v)
        {
            foreach ($confs['first_id'] as $id)
            {
                if ($astro1['planets'][$id]['in_house_id'] === $k)
                {
                    $score = $v;
                    break 2;
                }
            }
        }

        $phase060120Num = 0; // 相位0、60、120的数量
        $phase90180Num = 0; // 相位90、180的数量
        // 遍历星体
        foreach ($confs['first_id'] as $pid)
        {
            // 若外环盘太阳不为空相
            if (!empty($astro1['planets'][$pid]['phase']))
            {
                foreach ($astro1['planets'][$pid]['phase'] as $phase)
                {
                    if ($phase['id'] < 10)
                    {
                        $key = $pid . '-' . $phase['id'] . '-' . $phase['phase_e'];

                        if ($phase['phase_e'] === 90)
                        {
                            $key = $pid . '-90';
                        }
                        if (!isset($confs['phase'][$key]))
                        {
                            $key = (string)$pid;
                        }
                        $score += $confs['phase'][$key];

                        if (in_array($phase['phase_e'], [0, 60, 120], true))
                        {
                            $phase060120Num++;
                        } elseif (in_array($phase['phase_e'], [90, 180], true))
                        {
                            $phase90180Num++;
                        }
                    }
                }
            }
        }
        /**
         * 以下四种选其一，按1234这个顺序进行判断
         * 1、若以上的配置同时出现大于等于2条的0、60、120度相位，以及大于等于2条的180、90度相位时，权重额外加3。
         * 2、若以上的配置同时出现大于等于2条的0、60、120度相位，权重额外加2。
         * 3、若以上的配置同时出现大于等于2条的180、90度相位时，权重额外加1。
         * 4、若以上的配置同时出现大于等于1条的0、60、120，并且这两颗星体无负面相位出现时，权重额外加1
         */
        if ($phase060120Num >= 2 && $phase90180Num >= 2)
        {
            $score += 3;
        } elseif ($phase060120Num >= 2)
        {
            $score += 2;
        } elseif ($phase90180Num >= 2)
        {
            $score++;
        } elseif ($phase060120Num >= 1 && $phase90180Num === 0)
        {
            $score++;
        }

        /**
         * 外环盘日、月、升与内环盘日、月、升为同象星座 在以上权重基础上额外+6
         */
        foreach ($confs['extra'] as $k => $v)
        {
            if ($v === 6)
            {
                // 判断是否为同象星座
                if ($astro0['planets'][$k]['in_sign_id'] % 4 === $astro1['planets'][$k]['in_sign_id'] % 4)
                {
                    $score += $v;
                    break;
                }
            } else
            {
                if ($astro0['planets'][$k]['in_sign_id'] === $astro1['planets'][$k]['in_sign_id'])
                {
                    $score += $v;
                    break;
                }
            }
        }
        // 最高95最低5分
        if ($score > 95)
        {
            $score = 95;
        } elseif ($score < 5)
        {
            $score = 5;
        }
        return $score;
    }

    /**
     * 计算相处预判
     *  大众：初识、交往中、长期交往、内心感受
     *  婚姻：恋爱、新婚燕尔、老夫老妻、内心感受
     *  恋爱：初识、热恋、谈婚论嫁、内心感受
     *  事业：初识、初步合作、并肩作战、内心感受
     *  朋友：初识、普通朋友、闺蜜哥们、内心感受
     * @param $astroData array 星盘数据
     * @param $confs array 参数配置
     *  pids 行星ID
     *  signs 星座得分
     * @return int
     */
    protected function getXcyp($astroData, $confs)
    {
        $score = 0;
        foreach ($confs['pids'] as $pid)
        {
            // 落宫
            if (isset($confs['houses']) && !empty($confs['houses']))
            {
                $score += $confs['houses'][$pid . '-' . $astroData['planets'][$pid]['in_house_id']];
            }// 落座
            elseif (isset($confs['signs']) && !empty($confs['signs']))
            {
                $score += $confs['signs'][$pid . '-' . $astroData['planets'][$pid]['in_sign_id']];
            }
        }
        return $score / count($confs['pids']);
    }

    /**
     * 计算比较
     * 婚姻：婚姻付出比较
     * 恋爱：恋爱关系主导
     * 事业：合作压力比较
     * 朋友：收获成长比较
     * @param $type int 0=>组合盘/时空盘（婚姻、恋爱）   1=>比较盘（事业、朋友）
     * @param $astroData array 星盘配置
     * @param $confs array 参数配置
     *  type=0
     *      sex 盘主性别
     *      signs 日月落座得分
     *  type=1
     *      is_same 两个本命盘是否水星落宫一致
     *      houses 水星落宫得分
     *      phases 外圈日月水金火与水星的相位得分 (60、120)
     * @return int
     */
    protected function getBj($type, $astroData, $confs): int
    {
        $score = 0;
        switch ($type)
        {
            case 1:
                // 盘主水星落宫
                $score += $confs['houses'][$astroData[0]['planets'][$confs['pid']]['in_house_id']];
                if (isset($confs['is_same']) && $confs['is_same'])
                {
                    for ($i = 0; $i < 5; $i++)
                    {
                        $key = $i . '-' . $confs['pid'];
                        if (isset($astroData[1]['planets'][$i]['phase'][$key])
                            && in_array($astroData[1]['planets'][$i]['phase'][$key]['phase_e'], [60, 120], true))
                        {
                            $score += $confs['phases'][$key];
                        }
                    }
                }
                break;
            default:
                $score += $confs['signs'][$confs['pid'] . '-' . $astroData['planets'][$confs['pid']]['in_sign_id']];
                break;
        }
        return $score;
    }

    /**
     * 获取词条
     * @param $rel
     * @param $scoreList
     * @param $records
     * @return array
     */
    protected function getDataText($rel, $scoreList, $records)
    {
        // 词条
        $textList = [
            7 => [
                [],
                [],
                [],
                [],
                [],
                [],

                // 初识 1-9分：形同陌路，交集较少、10-19分：缘分较浅，相处略显尴尬、20-29分：萍水相逢，点头之交、30分-39分：关系平淡，不痛不痒、40-49分：泛泛之交，了解不多、50-59分：相处和谐，略有好感、60-69分：相看不厌，互帮互助、70-79分：志同道合，相处轻松、80-89分：缘分深厚，好感爆棚、90-100分：最佳拍档，相见恨晚
                [
                    9 => '形同陌路，交集较少',
                    19 => '缘分较浅，相处略显尴尬',
                    29 => '萍水相逢，点头之交',
                    39 => '关系平淡，不痛不痒',
                    49 => '泛泛之交，了解不多',
                    59 => '相处和谐，略有好感',
                    69 => '相看不厌，互帮互助',
                    79 => '志同道合，相处轻松',
                    89 => '缘分深厚，好感爆棚',
                    100 => '最佳拍档，相见恨晚',
                ],
                // 交往中 1-9分：疏离感强，话不投机、10-19分：互生埋怨，敬而远之、20-29分：互动不多，缘分浅薄、30-39分：君子之交，保持距离、40-49分：萍水相逢，偶尔问候、50-59分：表面和谐，内心保持距离、60-69分：渐入佳境，客气往来、70-79分：和谐愉悦，相处顺利，80-89分：心领神会，默契十足、90-100分：莫逆之交，难舍难分
                [
                    9 => '疏离感强，话不投机',
                    19 => '互生埋怨，敬而远之',
                    29 => '互动不多，缘分浅薄',
                    39 => '君子之交，保持距离',
                    49 => '萍水相逢，偶尔问候',
                    59 => '表面和谐，内心保持距离',
                    69 => '渐入佳境，客气往来',
                    79 => '和谐愉悦，相处顺利',
                    89 => '心领神会，默契十足',
                    100 => '莫逆之交，难舍难分',
                ],
                // 长期交往 1-9分：阻力较强，难以维系关系、10-19分：不稳定的关系，矛盾一触即发、20-29分：时常冷漠，关系疏离、30-39分：泛泛之交，平淡无奇、40-49分：没有什么火花，也没有什么矛盾、50-59分：客客气气，保持距离、60-69分：话题共享，相处自然、70-79分：时常关心，彼此在意，80-89分：互相扶持，肝胆相照、90-100分：超强缘分，生死之交
                [
                    9 => '阻力较强，难以维系关系',
                    19 => '不稳定的关系，矛盾一触即发',
                    29 => '时常冷漠，关系疏离',
                    39 => '泛泛之交，平淡无奇',
                    49 => '没有什么火花，也没有什么矛盾',
                    59 => '客客气气，保持距离',
                    69 => '话题共享，相处自然',
                    79 => '时常关心，彼此在意',
                    89 => '互相扶持，肝胆相照',
                    100 => '超强缘分，生死之交',
                ],
                // 内心感受 1-9分：莫非你们是彼此的路人甲？、10-19分：心的距离隔着万里长城、20-29分：面和心违，想法不合、30-39分：你说你的，我做我的、40-49分：尊重理解，但好像与我无“瓜”、50-59分：忽冷忽热，态度随心、60-69分：少量依赖，彼此牵挂、70-79分：努力靠近，懂得付出，80-89分：超级在意，超级想念、90-100分：惺惺相惜，堪称唯一
                [
                    9 => '莫非你们是彼此的路人甲？',
                    19 => '心的距离隔着万里长城',
                    29 => '面和心违，想法不合',
                    39 => '你说你的，我做我的',
                    49 => '尊重理解，但好像与我无“瓜”',
                    59 => '忽冷忽热，态度随心',
                    69 => '少量依赖，彼此牵挂',
                    79 => '努力靠近，懂得付出',
                    89 => '超级在意，超级想念',
                    100 => '惺惺相惜，堪称唯一',
                ],

                [
                    [],
                    []
                ]
            ],
            // 恋爱 尊重信任、支持理解、互相依赖、共同兴趣、沟通、亲密  初识、热恋、谈婚论嫁、内心感受
            8 => [
                // 尊重信任 5-10分：猜忌隐瞒、11-30分：略显疏离、31-49分：信任有限、50-60分：和谐平等、61-79分：互相尊重、80-89分：真诚相待、90-95分：毫无保留
                [
                    10 => '猜忌隐瞒',
                    30 => '略显疏离',
                    49 => '信任有限',
                    60 => '和谐平等',
                    79 => '互相尊重',
                    89 => '真诚相待',
                    100 => '毫无保留',
                ],
                // 支持理解 5-10分：针尖麦芒、11-30分：情浅意淡、31-49分：支持有限、50-60分：三观一致、61-79分：互相包容、80-89分：心意相通、90-95分：全心支持
                [
                    10 => '针尖麦芒',
                    30 => '情浅意淡',
                    49 => '支持有限',
                    60 => '三观一致',
                    79 => '互相包容',
                    89 => '心意相通',
                    100 => '全心支持',
                ],
                // 互相依赖 5-10分：自由洒脱、11-30分：轻度依傍、31-49分：稍有依托、50-60分：相互依存、61-79分：你侬我侬、80-89分：没你不行、90-95分：如胶似漆
                [
                    10 => '自由洒脱',
                    30 => '轻度依傍',
                    49 => '稍有依托',
                    60 => '相互依存',
                    79 => '你侬我侬',
                    89 => '没你不行',
                    100 => '如胶似漆',
                ],
                // 共同兴趣 5-10分：各有所爱、11-30分：稍有同趣、31-49分：喜好一致、50-60分：互相认可、61-79分：互相欣赏、80-89分：兴趣相投、90-95分：爱屋及乌
                [
                    10 => '各有所爱',
                    30 => '稍有同趣',
                    49 => '喜好一致',
                    60 => '互相认可',
                    79 => '互相欣赏',
                    89 => '兴趣相投',
                    100 => '爱屋及乌',
                ],
                // 沟通 5-10分：鸡同鸭讲、11-30分：话不投机、31-49分：互相理解、50-60分：倾听包容、61-79分：沟通顺畅、80-89分：心意相通、90-95分：心有灵犀
                [
                    10 => '鸡同鸭讲',
                    30 => '话不投机',
                    49 => '互相理解',
                    60 => '倾听包容',
                    79 => '沟通顺畅',
                    89 => '心意相通',
                    100 => '心有灵犀',
                ],
                // 亲密 5-10分：难以亲近、11-30分：稍有情谊、31-49分：略见亲密、50-60分：较为亲昵、61-79分：亲密无间、80-89分：浓情蜜意、90-95分：如胶似漆
                [
                    10 => '难以亲近',
                    30 => '稍有情谊',
                    49 => '略见亲密',
                    60 => '较为亲昵',
                    79 => '亲密无间',
                    89 => '浓情蜜意',
                    100 => '如胶似漆',
                ],

                // 初识 1-9分：Hi，你哪位？、10-19分：缺乏互动，犹如两个世界、20-29分：心不在焉，不太在意、30分-39分：心无波澜，平淡如水、40-49分：有点好感，不温不火、50-59分：稍有感觉，尝试了解、60-69分：怦然心动，小鹿乱撞、70-79分：情非得已，一拍即合、80-89分：相看不厌，越看越爱、90-100分：一见钟情，命中天子/女
                [
                    9 => 'Hi，你哪位？',
                    19 => '缺乏互动，犹如两个世界',
                    29 => '心不在焉，不太在意',
                    39 => '心无波澜，平淡如水',
                    49 => '有点好感，不温不火',
                    59 => '稍有感觉，尝试了解',
                    69 => '怦然心动，小鹿乱撞',
                    79 => '情非得已，一拍即合',
                    89 => '相看不厌，越看越爱',
                    100 => '一见钟情，命中天子/女',
                ],
                // 热恋 1-9分：关系结冰，难以融化、10-19分：情同陌路，不够走心、20-29分：貌合神离，时常逃避、30分-39分：若即若离，彼此猜疑、40-49分：反复试探，缺少甜度、50-59分：注重平衡，相互妥协、60-69分：相互关照，和谐相处、70-79分：心心相印，爱意持续升温、80-89分：轰轰烈烈，甜甜蜜蜜、90-100分：情深似海，非你莫属
                [
                    9 => '关系结冰，难以融化',
                    19 => '情同陌路，不够走心',
                    29 => '貌合神离，时常逃避',
                    39 => '若即若离，彼此猜疑',
                    49 => '反复试探，缺少甜度',
                    59 => '注重平衡，相互妥协',
                    69 => '相互关照，和谐相处',
                    79 => '心心相印，爱意持续升温',
                    89 => '轰轰烈烈，甜甜蜜蜜',
                    100 => '情深似海，非你莫属',
                ],
                // 谈婚论嫁 1-9分：同床异梦，进入冰点、10-19分：高开低走，渐行渐远、20-29分：犹豫不决，无法直面问题、30分-39分：情感不够浓烈，关系难以推进、40-49分：关系有阻力，现实有差距、50-59分：互动良好，平平淡淡、60-69分：心有灵犀，相互依靠、70-79分：形影不离，如胶似漆、80-89分：含情脉脉，比翼双飞、90-100分：情定终生，马上结婚～
                [
                    9 => '同床异梦，进入冰点',
                    19 => '高开低走，渐行渐远',
                    29 => '犹豫不决，无法直面问题',
                    39 => '情感不够浓烈，关系难以推进',
                    49 => '关系有阻力，现实有差距',
                    59 => '互动良好，平平淡淡',
                    69 => '心有灵犀，相互依靠',
                    79 => '形影不离，如胶似漆',
                    89 => '含情脉脉，比翼双飞',
                    100 => '情定终生，马上结婚～',
                ],
                // 内心感受 1-9分：无形阻力，岌岌可危、10-19分：相处不顺，倍感心累、20-29分：心口不一，不够在意、30-39分：缺乏信任，猜疑不断、40-49分：情绪起伏，忽冷忽热、50-59分：小吵小闹，缺乏理解、60-69分：支持理解，互相尊重、70-79分：爱你不只是说说而已，80-89分：爱你是我最正确的决定、90-100分：我爱你，我今生今世只需要你
                [
                    9 => '无形阻力，岌岌可危',
                    19 => '相处不顺，倍感心累',
                    29 => '心口不一，不够在意',
                    39 => '缺乏信任，猜疑不断',
                    49 => '情绪起伏，忽冷忽热',
                    59 => '小吵小闹，缺乏理解',
                    69 => '支持理解，互相尊重',
                    79 => '爱你不只是说说而已',
                    89 => '爱你是我最正确的决定',
                    100 => '我爱你，我今生今世只需要你',
                ],

                // 男 10%：毫无“反抗”之力、20%：乖乖顺从、30%：话语权需争取、40%：想拿到主权就再努力一下！、50%：势均力敌，相互妥协、60%：拥有主权，适当让步、70%：跟着我走准没错、80%：爱我就要听我的、90%：我就是核心 100%：爱情尽在掌握
                // 女 10%：百依百顺、20%：较为顺从、30%：话语权需争取、40%：力争平衡、50%：势均力敌，相互妥协、60%：拥有主权，适当让步、70%：听我的准没错、80%：乖乖听我的、90%：我就是核心 100%：掌控全局
                [
                    // 女
                    [
                        10 => '百依百顺',
                        20 => '较为顺从',
                        30 => '话语权需争取',
                        40 => '力争平衡',
                        50 => '势均力敌，相互妥协',
                        60 => '拥有主权，适当让步',
                        70 => '听我的准没错',
                        80 => '乖乖听我的',
                        90 => '我就是核心',
                        100 => '爱情尽在掌握',
                    ],
                    // 男
                    [
                        10 => '毫无“反抗”之力',
                        20 => '乖乖顺从',
                        30 => '话语权需争取',
                        40 => '想拿到主权就再努力一下！',
                        50 => '势均力敌，相互妥协',
                        60 => '拥有主权，适当让步',
                        70 => '跟着我走准没错',
                        80 => '爱我就要听我的',
                        90 => '我就是核心',
                        100 => '掌控全局',
                    ]
                ]
            ],
            // 婚姻 尊重信任、支持理解、事业财富、共同目标、妥协忍让、性和谐  恋爱、新婚燕尔、老夫老妻、内心感受
            9 => [
                // 尊重信任 5-10分：猜忌隐瞒、11-30分：略显疏离、31-49分：信任有限、50-60分：和谐平等、61-79分：互相尊重、80-89分：真诚相待、90-95分：毫无保留
                [
                    10 => '猜忌隐瞒',
                    30 => '略显疏离',
                    49 => '信任有限',
                    60 => '和谐平等',
                    79 => '互相尊重',
                    89 => '真诚相待',
                    100 => '毫无保留',
                ],
                // 支持理解 5-10分：针尖麦芒、11-30分：情浅意淡、31-49分：支持有限、50-60分：三观一致、61-79分：互相包容、80-89分：心意相通、90-95分：全心支持
                [
                    10 => '针尖麦芒',
                    30 => '情浅意淡',
                    49 => '支持有限',
                    60 => '三观一致',
                    79 => '互相包容',
                    89 => '心意相通',
                    100 => '全心支持',
                ],
                // 事业财富 5-10分：难以聚财、11-30分：略有小财、31-49分：有所积累、50-60分：小康之家、61-79分：家庭富足、80-89分：家境殷实、90-95分：天作之合
                [
                    10 => '难以聚财',
                    30 => '略有小财',
                    49 => '有所积累',
                    60 => '小康之家',
                    79 => '家庭富足',
                    89 => '家境殷实',
                    100 => '天作之合',
                ],
                // 共同目标 5-10分：各做各事、11-30分：稍有共识、31-49分：目标趋近、50-60分：目标一致、61-79分：同心同向、80-89分：共同拼搏、90-95分：携手并进
                [
                    10 => '各做各事',
                    30 => '稍有共识',
                    49 => '目标趋近',
                    60 => '目标一致',
                    79 => '同心同向',
                    89 => '共同拼搏',
                    100 => '携手并进',
                ],
                // 妥协忍让 5-10分：互不理解、11-30分：稍有容忍、31-49分：时常妥协、50-60分：较为宽容、61-79分：宽容大度、80-89分：深度包容、90-95分：全然接纳
                [
                    10 => '互不理解',
                    30 => '稍有容忍',
                    49 => '时常妥协',
                    60 => '较为宽容',
                    79 => '宽容大度',
                    89 => '深度包容',
                    100 => '全然接纳',
                ],
                // 性和谐 5-10分：心无波澜、11-30分：稍有感觉、31-49分：比较合拍、50-60分：十分融洽、61-79分：和谐顺畅、80-89分：激情四溢、90-95分：天雷地火
                [
                    10 => '心无波澜',
                    30 => '稍有感觉',
                    49 => '比较合拍',
                    60 => '十分融洽',
                    79 => '和谐顺畅',
                    89 => '激情四溢',
                    100 => '天雷地火',
                ],

                // 恋爱 1-9分：表面关系，若即若离、10-19分：缺乏互动，犹如两个世界、20-29分：心不在焉，不太在意、30分-39分：心无波澜，平淡如水、40-49分：有点好感，不温不火、50-59分：稍有感觉，尝试了解、60-69分：怦然心动，小鹿乱撞、70-79分：情非得已，一拍即合、80-89分：相看不厌，越看越爱、90-100分：一见钟情，命中天子/女
                [
                    9 => '表面关系，若即若离',
                    19 => '缺乏互动，犹如两个世界',
                    29 => '心不在焉，不太在意',
                    39 => '心无波澜，平淡如水',
                    49 => '有点好感，不温不火',
                    59 => '稍有感觉，尝试了解',
                    69 => '怦然心动，小鹿乱撞',
                    79 => '情非得已，一拍即合',
                    89 => '相看不厌，越看越爱',
                    100 => '一见钟情，命中天子/女',
                ],
                // 新婚燕尔 1-9分：貌合心离，不够在意、10-19分：心疏路远，无所牵绊、20-29分：交心未深，常常回避、30分-39分：彼此猜忌，缺少信任、40-49分：试探不断，缺少情趣、50-59分：平衡妥协，互相容忍、60-69分：彼此关心，融洽相处、70-79分：心心相印，情感升华、80-89分：热情澎湃，甜蜜无边、90-100分：情深如海，世间绝配
                [
                    9 => '貌合心离，不够在意',
                    19 => '心疏路远，无所牵绊',
                    29 => '交心未深，常常回避',
                    39 => '彼此猜忌，缺少信任',
                    49 => '试探不断，缺少情趣',
                    59 => '平衡妥协，互相容忍',
                    69 => '彼此关心，融洽相处',
                    79 => '心心相印，情感升华',
                    89 => '热情澎湃，甜蜜无边',
                    100 => '情深如海，世间绝配',
                ],
                // 老夫老妻 1-9分：同床异梦，进入冰点、10-19分：高开低走，渐行渐远、20-29分：犹豫不决，无法直面问题、30分-39分：情感不够浓烈，关系难以推进、40-49分：关系有阻力，现实有差距、50-59分：互动良好，平平淡淡、60-69分：心有灵犀，相互依靠、70-79分：形影不离，如胶似漆、80-89分：夫唱妇随，风雨同舟、90-100分：白头偕老，这辈子我们都要在一起
                [
                    9 => '同床异梦，进入冰点',
                    19 => '高开低走，渐行渐远',
                    29 => '犹豫不决，无法直面问题',
                    39 => '情感不够浓烈，关系难以推进',
                    49 => '关系有阻力，现实有差距',
                    59 => '互动良好，平平淡淡',
                    69 => '心有灵犀，相互依靠',
                    79 => '形影不离，如胶似漆',
                    89 => '夫唱妇随，风雨同舟',
                    100 => '白头偕老，这辈子我们都要在一起',
                ],
                // 内心感受 1-9分：无形阻力，岌岌可危、10-19分：相处不顺，倍感心累、20-29分：心口不一，不够在意、30-39分：缺乏信任，猜疑不断、40-49分：情绪起伏，忽冷忽热、50-59分：小吵小闹，缺乏理解、60-69分：支持理解，互相尊重、70-79分：爱你不只是说说而已，80-89分：爱你是我最正确的决定、90-100分：我爱你，我今生今世只需要你
                [
                    9 => '无形阻力，岌岌可危',
                    19 => '相处不顺，倍感心累',
                    29 => '心口不一，不够在意',
                    39 => '缺乏信任，猜疑不断',
                    49 => '情绪起伏，忽冷忽热',
                    59 => '小吵小闹，缺乏理解',
                    69 => '支持理解，互相尊重',
                    79 => '爱你不只是说说而已',
                    89 => '爱你是我最正确的决定',
                    100 => '我爱你，我今生今世只需要你',
                ],

                // 男 10%：敷衍了事、20%：表现平平、30%：略有付出、40%：犹犹豫豫、50%：你付出多少我就多少、60%：积极付出、70%：我们共同承担、80%：你要的我都有、90%：牺牲自己 100%：竭尽全力
                // 女 10%：置身事外、20%：你的事与我无关、30%：有所保留、40%：犹犹豫豫、50%：你付出多少我就多少、60%：积极付出、70%：我们共同承担、80%：给你所有最好的、90%：牺牲自己都给你 100%：我的就是你的
                [
                    // 女
                    [
                        10 => '置身事外',
                        20 => '你的事与我无关',
                        30 => '有所保留',
                        40 => '犹犹豫豫',
                        50 => '你付出多少我就多少',
                        60 => '积极付出',
                        70 => '我们共同承担',
                        80 => '给你所有最好的',
                        90 => '牺牲自己都给你',
                        100 => '我的就是你的',
                    ],
                    // 男
                    [
                        10 => '敷衍了事',
                        20 => '表现平平',
                        30 => '略有付出',
                        40 => '犹犹豫豫',
                        50 => '你付出多少我就多少',
                        60 => '积极付出',
                        70 => '我们共同承担',
                        80 => '你要的我都有',
                        90 => '牺牲自己',
                        100 => '竭尽全力',
                    ]
                ]
            ],
            // 事业 互相成就、团队协作、利益拟合、目标一致、信任支持、沟通交流  初识、初步合作、并肩作战、内心感受
            10 => [
                // 互相成就 5-10分：难有帮助、11-30分：略有助益、31-49分：小有帮衬、50-60分：相互扶持、61-79分：携手共进、80-89分：合作共赢、90-95分：共铸辉煌
                [
                    10 => '难有帮助',
                    30 => '略有助益',
                    49 => '小有帮衬',
                    60 => '相互扶持',
                    79 => '携手共进',
                    89 => '合作共赢',
                    100 => '共铸辉煌',
                ],
                // 团队协作 5-10分：难以合作、11-30分：稍有配合、31-49分：协同合作、50-60分：合作联动、61-79分：紧密协作、80-89分：齐心合力、90-95分：完美搭档
                [
                    10 => '难以合作',
                    30 => '稍有配合',
                    49 => '协同合作',
                    60 => '合作联动',
                    79 => '紧密协作',
                    89 => '齐心合力',
                    100 => '完美搭档',
                ],
                // 利益拟合 5-10分：利益不均、11-30分：稍有共利、31-49分：利益趋同、50-60分：利益共通、61-79分：分配合理、80-89分：利为一体、90-95分：荣辱与共
                [
                    10 => '利益不均',
                    30 => '稍有共利',
                    49 => '利益趋同',
                    60 => '利益共通',
                    79 => '分配合理',
                    89 => '利为一体',
                    100 => '荣辱与共',
                ],
                // 目标一致 5-10分：各做各事、11-30分：稍有共识、31-49分：目标趋近、50-60分：目标一致、61-79分：同心同向、80-89分：共同拼搏、90-95分：齐心协力
                [
                    10 => '各做各事',
                    30 => '稍有共识',
                    49 => '目标趋近',
                    60 => '目标一致',
                    79 => '同心同向',
                    89 => '共同拼搏',
                    100 => '齐心协力',
                ],
                // 信任支持 5-10分：各有疑心、11-30分：稍有信任、31-49分：支持有限、50-60分：三观一致、61-79分：互相支持、80-89分：深信不疑、90-95分：鼎力相助
                [
                    10 => '各有疑心',
                    30 => '稍有信任',
                    49 => '支持有限',
                    60 => '三观一致',
                    79 => '互相支持',
                    89 => '深信不疑',
                    100 => '鼎力相助',
                ],
                // 沟通交流 5-10分：鸡同鸭讲、11-30分：话不投机、31-49分：互相理解、50-60分：倾听包容、61-79分：沟通顺畅、80-89分：心领神会、90-95分：心照不宣
                [
                    10 => '鸡同鸭讲',
                    30 => '话不投机',
                    49 => '互相理解',
                    60 => '倾听包容',
                    79 => '沟通顺畅',
                    89 => '心领神会',
                    100 => '心照不宣',
                ],

                // 初识 1-9分：形同陌路，交集较少、10-19分：疏远沟通少，相处难为情、20-29分：萍水相逢，点头之交、30分-39分：关系平淡，不痛不痒、40-49分：桌上谈笑，泛泛而谈、50-59分：和谐融洽，相互尊重、60-69分：志同道合，相处轻松、70-79分：同甘共苦，互相支持、80-89分：缘分深厚，默契十足、90-100分：完美契合，真诚相待
                [
                    9 => '形同陌路，交集较少',
                    19 => '疏远沟通少，相处难为情',
                    29 => '萍水相逢，点头之交',
                    39 => '关系平淡，不痛不痒',
                    49 => '桌上谈笑，泛泛而谈',
                    59 => '和谐融洽，相互尊重',
                    69 => '志同道合，相处轻松',
                    79 => '同甘共苦，互相支持',
                    89 => '缘分深厚，默契十足',
                    100 => '完美契合，真诚相待',
                ],
                // 初步合作 1-9分：互不认可，话不投机、10-19分：互生埋怨，敬而远之、20-29分：彼此疏离，略显尴尬、30-39分：点头之交，淡泊相处、40-49分：君子之交，保持距离、50-59分：表面和谐，轻松互动、60-69分：相互配合，略有默契、70-79分：和谐愉悦，心有灵犀，80-89分：心领神会，默契十足、90-100分：相见恨晚，最佳拍档
                [
                    9 => '互不认可，话不投机',
                    19 => '互生埋怨，敬而远之',
                    29 => '彼此疏离，略显尴尬',
                    39 => '点头之交，淡泊相处',
                    49 => '君子之交，保持距离',
                    59 => '表面和谐，轻松互动',
                    69 => '相互配合，略有默契',
                    79 => '和谐愉悦，心有灵犀',
                    89 => '心领神会，默契十足',
                    100 => '相见恨晚，最佳拍档',
                ],
                // 并肩作战 1-9分：互相排斥，冲突频发、10-19分：关系紧张，互不理解、20-29分：疏离冷漠，关系淡薄、30-39分：互不影响，交往平淡、40-49分：没有什么火花，也没有什么矛盾、50-59分：克制保持，相互尊重、60-69分：话题共享，相处自然、70-79分：时常关心，彼此在意，80-89分：互相扶持，肝胆相照、90-100分：超强缘分，并肩作战
                [
                    9 => '互相排斥，冲突频发',
                    19 => '关系紧张，互不理解',
                    29 => '疏离冷漠，关系淡薄',
                    39 => '互不影响，交往平淡',
                    49 => '没有什么火花，也没有什么矛盾',
                    59 => '克制保持，相互尊重',
                    69 => '话题共享，相处自然',
                    79 => '时常关心，彼此在意',
                    89 => '互相扶持，肝胆相照',
                    100 => '超强缘分，并肩作战',
                ],
                // 内心感受 1-9分：莫非你们是彼此的路人甲？、10-19分：心的距离隔着万里长城、20-29分：面和心违，缺少共鸣、30-39分：你说你的，我做我的、40-49分：尊重理解，但好像与我无“瓜”、50-59分：礼貌客套，保持距离、60-69分：相互配合，有所成长、70-79分：努力靠近，懂得付出，80-89分：亲密无间，关系够铁、90-100分：羁绊深厚，无私奉献
                [
                    9 => '莫非你们是彼此的路人甲？',
                    19 => '心的距离隔着万里长城',
                    29 => '面和心违，缺少共鸣',
                    39 => '你说你的，我做我的',
                    49 => '尊重理解，但好像与我无“瓜”',
                    59 => '礼貌客套，保持距离',
                    69 => '相互配合，有所成长',
                    79 => '努力靠近，懂得付出',
                    89 => '亲密无间，关系够铁',
                    100 => '羁绊深厚，无私奉献',
                ],

                // 男 10%：毫无压力，自如应对、20%：认真即可，轻松应对、30%：努力付出、稍有压力、40%：刻苦完成、压力在心头、50%：心头沉甸甸、60%：积极配合但压力较大、70%：压力沉重、80%：重压在肩，很难消解、90%：压力山大，难以应对 100%：快要被压垮
                // 女 10%：毫无压力，自如应对、20%：认真即可，轻松应对、30%：努力付出、稍有压力、40%：刻苦完成、压力在心头、50%：心头沉甸甸、60%：积极配合但压力较大、70%：压力沉重、80%：重压在肩，很难消解、90%：压力山大，难以应对 100%：快要被压垮
                [
                    // 女
                    [
                        10 => '毫无压力，自如应对',
                        20 => '认真即可，轻松应对',
                        30 => '努力付出、稍有压力',
                        40 => '刻苦完成、压力在心头',
                        50 => '心头沉甸甸',
                        60 => '极配合但压力较大',
                        70 => '压力沉重',
                        80 => '重压在肩，很难消解',
                        90 => '压力山大，难以应对',
                        100 => '快要被压垮',
                    ],
                    // 男
                    [
                        10 => '毫无压力，自如应对',
                        20 => '认真即可，轻松应对',
                        30 => '努力付出、稍有压力',
                        40 => '刻苦完成、压力在心头',
                        50 => '心头沉甸甸',
                        60 => '极配合但压力较大',
                        70 => '压力沉重',
                        80 => '重压在肩，很难消解',
                        90 => '压力山大，难以应对',
                        100 => '快要被压垮',
                    ]
                ]
            ],
            // 朋友 共同兴趣、信任支持、倾听沟通、共同进步、真实坦诚、密切程度  初识、普通朋友、闺蜜哥们、内心感受
            11 => [
                // 共同兴趣 5-10分：各有所爱、11-30分：稍有同趣、31-49分：喜好一致、50-60分：互相认可、61-79分：互相欣赏、80-89分：兴趣相投、90-95分：高山流水
                [
                    10 => '各有所爱',
                    30 => '稍有同趣',
                    49 => '喜好一致',
                    60 => '互相认可',
                    79 => '互相欣赏',
                    89 => '兴趣相投',
                    100 => '高山流水',
                ],
                // 信任支持 5-10分：各有疑心、11-30分：稍有信任、31-49分：支持有限、50-60分：三观一致、61-79分：互相支持、80-89分：深信不疑、90-95分：鼎力相助
                [
                    10 => '各有疑心',
                    30 => '稍有信任',
                    49 => '支持有限',
                    60 => '三观一致',
                    79 => '互相支持',
                    89 => '深信不疑',
                    100 => '鼎力相助',
                ],
                // 倾听沟通 5-10分：鸡同鸭讲、11-30分：话不投机、31-49分：互相理解、50-60分：倾听包容、61-79分：沟通顺畅、80-89分：心领神会、90-95分：心照不宣
                [
                    10 => '鸡同鸭讲',
                    30 => '话不投机',
                    49 => '互相理解',
                    60 => '倾听包容',
                    79 => '沟通顺畅',
                    89 => '心领神会',
                    100 => '心照不宣',
                ],
                // 共同进步 5-10分：难有帮助、11-30分：略有助益、31-49分：小有帮衬、50-60分：相互扶持、61-79分：携手共进、80-89分：合作共赢、90-95分：共铸辉煌
                [
                    10 => '难有帮助',
                    30 => '略有助益',
                    49 => '小有帮衬',
                    60 => '相互扶持',
                    79 => '携手共进',
                    89 => '合作共赢',
                    100 => '共铸辉煌',
                ],
                // 真实坦诚 5-10分：难言之隐、11-30分：稍有坦露、31-49分：较为真诚、50-60分：真心实意、61-79分：真正交心、80-89分：极尽坦诚、90-95分：毫无保留
                [
                    10 => '难言之隐',
                    30 => '稍有坦露',
                    49 => '较为真诚',
                    60 => '真心实意',
                    79 => '真正交心',
                    89 => '极尽坦诚',
                    100 => '毫无保留',
                ],
                // 密切程度 5-10分：较为疏离、11-30分：稍有情谊、31-49分：比较合拍、50-60分：十分融洽、61-79分：情谊深厚、80-89分：情同手足、90-95分：刎颈之交
                [
                    10 => '较为疏离',
                    30 => '稍有情谊',
                    49 => '比较合拍',
                    60 => '十分融洽',
                    79 => '情谊深厚',
                    89 => '情同手足',
                    100 => '刎颈之交',
                ],

                // 初识 1-9分：形同陌路，交集较少、10-19分：缘分较浅，相处略显尴尬、20-29分：萍水相逢，点头之交、30分-39分：关系平淡，不痛不痒、40-49分：泛泛之交，了解不多、50-59分：相处和谐，略有好感、60-69分：相看不厌，互帮互助、70-79分：志同道合，相处轻松、80-89分：缘分深厚，好感爆棚、90-100分：最佳拍档，相见恨晚
                [
                    9 => '形同陌路，交集较少',
                    19 => '缘分较浅，相处略显尴尬',
                    29 => '萍水相逢，点头之交',
                    39 => '关系平淡，不痛不痒',
                    49 => '泛泛之交，了解不多',
                    59 => '相处和谐，略有好感',
                    69 => '相看不厌，互帮互助',
                    79 => '志同道合，相处轻松',
                    89 => '缘分深厚，好感爆棚',
                    100 => '最佳拍档，相见恨晚',
                ],
                // 普通朋友 1-9分：疏离感强，话不投机、10-19分：互生埋怨，敬而远之、20-29分：互动不多，缘分浅薄、30-39分：君子之交，保持距离、40-49分：萍水相逢，偶尔问候、50-59分：表面和谐，内心保持距离、60-69分：渐入佳境，客气往来、70-79分：和谐愉悦，相处顺利，80-89分：心领神会，默契十足、90-100分：莫逆之交，难舍难分
                [
                    9 => '疏离感强，话不投机',
                    19 => '互生埋怨，敬而远之',
                    29 => '互动不多，缘分浅薄',
                    39 => '君子之交，保持距离',
                    49 => '萍水相逢，偶尔问候',
                    59 => '表面和谐，内心保持距离',
                    69 => '渐入佳境，客气往来',
                    79 => '和谐愉悦，相处顺利',
                    89 => '心领神会，默契十足',
                    100 => '莫逆之交，难舍难分',
                ],
                // 闺蜜哥们 1-9分：阻力较强，难以维系关系、10-19分：时常冷漠，不太在意、20-29分：没有什么火花，也没有什么矛盾、30-39分：泛泛之交，平淡无奇、40-49分：酒肉朋友，缺乏亲密、50-59分：点头之交，互相尊重、60-69分：话题共享，相处自然、70-79分：支持依赖，最佳“损友”，80-89分：海内存知己，天涯若比邻、90-100分：情投手足，生生世世不分离
                [
                    9 => '阻力较强，难以维系关系',
                    19 => '时常冷漠，不太在意',
                    29 => '没有什么火花，也没有什么矛盾',
                    39 => '泛泛之交，平淡无奇',
                    49 => '酒肉朋友，缺乏亲密',
                    59 => '点头之交，互相尊重',
                    69 => '话题共享，相处自然',
                    79 => '支持依赖，最佳',
                    89 => '海内存知己，天涯若比邻',
                    100 => '情投手足，生生世世不分离',
                ],
                // 内心感受 1-9分：莫非你们是彼此的路人甲？、10-19分：心的距离隔着万里长城、20-29分：面和心违，想法不合、30-39分：你说你的，我做我的、40-49分：尊重理解，但好像与我无“瓜”、50-59分：普通朋友、相处平淡、60-69分：互相珍惜，相互牵挂、70-79分：有什么好事儿，我都想着你、80-89分：遇见彼此，是你们的福气！、90-100分：桃花潭水深千尺，不及汪伦送我情
                [
                    9 => '莫非你们是彼此的路人甲？',
                    19 => '心的距离隔着万里长城',
                    29 => '面和心违，想法不合',
                    39 => '你说你的，我做我的',
                    49 => '尊重理解，但好像与我无“瓜”',
                    59 => '普通朋友、相处平淡',
                    69 => '互相珍惜，相互牵挂',
                    79 => '有什么好事儿，我都想着你',
                    89 => '遇见彼此，是你们的福气！',
                    100 => '桃花潭水深千尺，不及汪伦送我情',
                ],

                // 男 10%：朋友就是朋友，不提成长、20%：小有收获、30%：有所感悟、40%：被改变是一件开心的事、50%：不知不觉模仿你、60%：我也开始有了你的特质、70%：一起成长、80%：希望向你一样优秀、90%：你是我的好老师 100%：听你的准没错
                // 女 10%：朋友就是朋友，不提成长、20%：小有收获、30%：有所感悟、40%：被改变是一件开心的事、50%：不知不觉模仿你、60%：我也开始有了你的特质、70%：一起成长、80%：希望向你一样优秀、90%：你是我的好老师 100%：听你的准没错
                [
                    // 女
                    [
                        10 => '朋友就是朋友，不提成长',
                        20 => '小有收获',
                        30 => '有所感悟',
                        40 => '被改变是一件开心的事',
                        50 => '不知不觉模仿你',
                        60 => '我也开始有了你的特质',
                        70 => '一起成长',
                        80 => '希望向你一样优秀',
                        90 => '你是我的好老师',
                        100 => '听你的准没错',
                    ],
                    // 男
                    [
                        10 => '朋友就是朋友，不提成长',
                        20 => '小有收获',
                        30 => '有所感悟',
                        40 => '被改变是一件开心的事',
                        50 => '不知不觉模仿你',
                        60 => '我也开始有了你的特质',
                        70 => '一起成长',
                        80 => '希望向你一样优秀',
                        90 => '你是我的好老师',
                        100 => '听你的准没错',
                    ]
                ]
            ],
        ];
        $nameList = [
            7 => [
                '',
                '',
                '',
                '',
                '',
                '',
                '初识',
                '交往中',
                '长期交往',
                '内心感受',
                '',
                ''
            ],
            8 => [
                '尊重信任',
                '支持理解',
                '互相依赖',
                '共同兴趣',
                '沟通',
                '亲密',
                '初识',
                '热恋',
                '谈婚论嫁',
                '内心感受',
                $records[0]['name'],
                $records[1]['name']
            ],
            9 => [
                '尊重信任',
                '支持理解',
                '事业财富',
                '共同目标',
                '妥协忍让',
                '性和谐',
                '恋爱',
                '新婚燕尔',
                '老夫老妻',
                '内心感受',
                $records[0]['name'],
                $records[1]['name']
            ],
            10 => [
                '互相成就',
                '团队协作',
                '利益拟合',
                '目标一致',
                '信任支持',
                '沟通交流',
                '初识',
                '初步合作',
                '并肩作战',
                '内心感受',
                $records[0]['name'],
                $records[1]['name']
            ],
            11 => [
                '共同兴趣',
                '信任支持',
                '倾听沟通',
                '共同进步',
                '真实坦诚',
                '密切程度',
                '初识',
                '普通朋友',
                '闺蜜哥们',
                '内心感受',
                $records[0]['name'],
                $records[1]['name']
            ],
        ];

        $sex1 = ((int)$records[0]['type']) === 1 ? 1 : 0;
        $sex2 = ((int)$records[1]['type']) === 1 ? 1 : 0;
        $result = [];
        $totalScore = 0;
        foreach ($scoreList as $k1 => $v1)
        {
            $t = [
                'name' => $nameList[$rel][$k1] ?? '',
                'score' => $v1,
                'text' => '',
            ];
            if ($k1 === 10)
            {
                $eachData = $textList[$rel][10][$sex1];
            } elseif ($k1 === 11)
            {
                $eachData = $textList[$rel][10][$sex2];
            } else
            {
                $eachData = $textList[$rel][$k1];
            }
            foreach ($eachData as $k2 => $v2)
            {
                if ($v1 <= $k2)
                {
                    $t['text'] = $v2;
                    break;
                }
            }
            $result[] = $t;
            if ($k1 < 6)
            {
                $totalScore += $v1 * $this->multiple;
            }
        }
        $totalScore = (int)$totalScore;
        $result[] = [
            'name' => '总分',
            'score' => $totalScore,
            'text' => $this->getTotalScoreText($rel, $totalScore)
        ];
        $footholdText = $this->getFootholdText($rel, $scoreList);
        $result[] = [
            'name' => '契合点',
            'score' => 0,
            'text' => $footholdText[0],
        ];
        $result[] = [
            'name' => '矛盾点',
            'score' => 0,
            'text' => $footholdText[1],
        ];
        $result[] = [
            'name' => '相处建议',
            'score' => 0,
            'text' => $this->getSuggestText($rel, $scoreList)
        ];

        return $result;
    }

    /**
     * 获取合盘总分词条
     * @param $type int 关系类型
     * @param $score float 分数
     * @return string
     */
    protected function getTotalScoreText($type, $score): string
    {
        $textList = [
            7 => [],
            8 => [
                50 => ['你们的关系像西天取经，要经历九九八十一难', '缘分不足，快去问问月老是不是忘记给你们牵红线了？'],
                100 => ['有距离感，难以深入彼此内心', '我们，好像总是就差一步'],
                200 => ['爱你在心口难开', '你不懂我，我不怪你'],
                300 => ['我们之间，好像无需多言', '即便没有结局，我依旧喜欢你'],
                350 => ['平平淡淡的“恋爱搭子”', '你是伴侣，是朋友，更是亲人'],
                400 => ['小吵小闹，但是爱意满满', '遇见你是我的三生有幸'],
                450 => ['好甜！恋爱可是被你们谈明白了～', '没有恋爱法宝，你们的关系也能坚不可摧'],
                500 => ['模范情侣第一名', '缘分爆表，难舍难分'],
                550 => ['难舍难分，再续前世缘', '甜甜蜜蜜，恩爱如漆'],
                600 => ['人人都羡慕的超强CP，亲密无间', '共同努力，互相扶持，生生世世在一起！'],
            ],
            9 => [
                50 => ['爱你，是想触碰又收回的手', '相濡以沫，不如相忘于江湖'],
                100 => ['我爱你，隔着冷静的距离', '当时只道是寻常'],
                200 => ['其实我不懂喜欢，但是我想走向你', '如若深爱，就不要害怕结局'],
                300 => ['但愿亲爱的你，接住我的真诚和拥抱', '我想从你的窗子里看月亮'],
                350 => ['共同面对起落，携手相伴风雨', '官方指定长期合作伙伴'],
                400 => ['深情不如久伴', '久处不厌，相谈甚欢'],
                450 => ['同心同德，相敬如宾', '今日共携手，来日共白头'],
                500 => ['既见君子，云胡不喜', '心有灵犀一点通'],
                550 => ['恩爱两不疑，长久永相依', '情比金坚，白首不离'],
                600 => ['既许一人以偏爱，愿尽余生之慷慨', '此生固短，无你何欢'],
            ],
            10 => [
                50 => ['难以和谐相处，心中十分不满', '常有矛盾显现，难以和睦相处'],
                100 => ['互不欣赏、难以合作', '合作易显矛盾，关系稍显僵持'],
                200 => ['合作略有摩擦，交流常现偏差', '偶有争执风波，关系稍显紧绷'],
                300 => ['交流常有不满，气氛略显压抑', '心间易生嫌隙，需要双方注意'],
                350 => ['日常相处和睦，工作配合无拘', '相处和睦，同心协力'],
                400 => ['共事氛围愉悦，心有灵犀', '交流较为畅快，关系融洽友爱'],
                450 => ['交流畅所欲言，情谊深厚绵延', '我知你心意，相处友爱多'],
                500 => ['彼此真心相待，合作愉快开怀', '彼此真诚相交，工作默契绝佳'],
                550 => ['协作默契无间，相处和谐舒适', '共事轻松愉悦，工作好拍档'],
                600 => ['初逢如遇知音，共事充满温馨', '相见甚欢，亲密无间'],
            ],
            11 => [
                50 => ['来去都是自由风，该相逢时自相逢。', '亲疏有度，远近相安。'],
                100 => ['于道各努力，千里自同风。', '各自忙碌，相互牵挂。'],
                200 => ['简单的陪伴 ，无条件的信任。', '久处不厌，闲谈甚欢。'],
                300 => ['懂你的言外之意，懂你的欲言又止。', '途有好伴，不觉长远。'],
                350 => ['在我这里，你永远胜过别人。', '有幸遇见 ，恰好合拍。'],
                400 => ['友情快乐相随，彼此珍惜。', '幸遇良友，温柔岁月。'],
                450 => ['心近则无距，友情永相连。', '心有灵犀，默契成章。'],
                500 => ['始于志趣，敬于人品，久于岁月。', '真诚以待，友情永在。'],
                550 => ['心有灵犀，不语亦相知。', '高山流水，知音难觅。'],
                600 => ['山河不足重，重在遇知己。', '风雨同舟，情谊长留。'],
            ],
        ];

        $res = '';
        if (isset($textList[$type]) && !empty($textList[$type]))
        {
            foreach ($textList[$type] as $k1 => $v1)
            {
                if ($score < $k1)
                {
                    $res = $v1[$score % 2] ?? '';// 有两个词条 按奇数和偶数进行区分
                    break;
                }
            }
        }
        return $res;
    }

    /**
     * 获取契合点/冲突点词条
     * @param $type int 关系类型
     * @param $score array
     * @return array
     */
    protected function getFootholdText($type, $score): array
    {
        // 50分以上为契合点  50分以下为矛盾点
        $textList = [
            7 => [],
            8 => [
                // 恋爱 尊重信任、支持理解、互相依赖、共同兴趣、沟通、亲密
                [
                    10 => ['这段关系已经分不清哪个是谎言哪个是真相，难不成小丑就是我自己？', 3],
                    30 => ['难以建立信任，一旦出现怀疑，关系危在旦夕。', 2],
                    49 => ['表面和谐，内在疏离，你说你的，我做我的。', 1],
                    60 => ['互相尊重，会给对方留一些小小的空间。', 1],
                    79 => ['你们是彼此最坚强的后盾。', 2],
                    100 => ['彼此的超强助力，可以无条件信任对方。', 3],
                ],
                [
                    10 => ['完全不理解对方的做法，你们的行为时常让彼此感到大受震撼。', 3],
                    30 => ['不是很懂你，也不太想懂你。', 2],
                    49 => ['虽然三观不太相同，但是你们彼此也能接受。', 1],
                    60 => ['你们彼此的鼓励，是共同前进路上的助推器', 1],
                    79 => ['梦想的彼岸，你们会携手一起前行！', 2],
                    100 => ['无论是诗还是远方，你们都愿意陪伴彼此。', 3],
                ],
                [
                    10 => ['对方一出现，就控制不住的心烦意乱。', 3],
                    30 => ['一个经常“玩失踪”，一个经常“心慌慌”', 2],
                    49 => ['这段关系略显冷漠，或许是你们都太过忙碌，容易忽略彼此，记得多关心对方。', 1],
                    60 => ['对方一出现，就会感到莫名的安心。', 1],
                    79 => ['只要有对方在，任何问题不在话下', 2],
                    100 => ['形影不离，灵魂伴侣', 3],
                ],
                [
                    10 => ['你们好像是两个世界的人，爱好完全不一致。', 3],
                    30 => ['对彼此的爱好提不起兴趣，关系缺乏乐趣。', 2],
                    49 => ['难以融进对方的世界，兴趣爱好不太一致。', 1],
                    60 => ['你的爱好我并不是很感兴趣，但是我想为了你去尝试。', 1],
                    79 => ['彼此的喜欢，也是对方的最爱', 2],
                    100 => ['我就是世界上的另一个你', 3],
                ],
                [
                    10 => ['沟通差劲，你们真的还有对方的联系方式吗？', 3],
                    30 => ['一天说不上几句话，动不动就开启冷暴力模式。', 2],
                    49 => ['三句一小吵，五句一大吵，吵完就和好。', 1],
                    60 => ['坚持打卡的“火花”搭子。', 1],
                    79 => ['默契十足，嘻嘻哈哈，聊天说地。', 2],
                    100 => ['一个眼神，我们就知道彼此心中所想。', 3],
                ],
                [
                    10 => ['你们像是“名义情侣”，有名无实，双方要共同努力，才能有机会让关系升温', 3],
                    30 => ['关系冷冰冰，“我站在你左侧，心却像隔着银河”。', 2],
                    49 => ['你们好像怎么努力也走不进对方的内心。', 1],
                    60 => ['偶尔的关心，可以让你们的关系火速升温。', 1],
                    79 => ['你们之间好像有强力的吸铁石，互相吸引。', 2],
                    100 => ['想天天粘在一起，我们天下第一好！', 3],
                ],
            ],
            9 => [
                // 婚姻 尊重信任、支持理解、事业财富、共同目标、妥协忍让、性和谐
                [
                    10 => ['相互不理解 以自我为中心', 3],
                    30 => ['猜忌、争吵、反复求证', 2],
                    49 => ['忘记承诺，做事无交代，需要反复推动', 1],
                    60 => ['互相之间能够说到做到，言行一致', 1],
                    79 => ['充分信任，不疑神疑鬼', 2],
                    100 => ['坦然地自我暴露，建立深层信任链接', 3],
                ],
                [
                    10 => ['完全无法沟通交流，一聊就吵', 3],
                    30 => ['冷战，假性理解，逃避解决问题', 2],
                    49 => ['频繁争吵，互相间无法换位思考', 1],
                    60 => ['遇分歧，尝试理解沟通', 1],
                    79 => ['遇事提供安慰鼓励，积极为对方托底', 2],
                    100 => ['灵魂伴侣，心有灵犀，相处合拍', 3],
                ],
                [
                    10 => ['干扰对方事业发展、财富提升', 3],
                    30 => ['难以为对方提供经济、事业方面的支持', 2],
                    49 => ['主观愿意层面为对方提供相应的经济支持', 1],
                    60 => ['共进退，愿意共担风险以及家庭开销', 1],
                    79 => ['能够为对方提供适当的经济、事业支持', 2],
                    100 => ['助力显著，互相做对方的后盾', 3],
                ],
                [
                    10 => ['目标不统一，干涉对方选择与发展', 3],
                    30 => ['人生目标不一致，无法互相理解', 2],
                    49 => ['人生目标不一致，但愿意求同存异', 1],
                    60 => ['主观上愿意为一致的目标努力奋斗', 1],
                    79 => ['共同努力意愿与行动力双强', 2],
                    100 => ['你中有我，我中有你，规划明晰', 3],
                ],
                [
                    10 => ['暗中较劲，互不妥协', 3],
                    30 => ['逃避问题，维持表面和谐', 2],
                    49 => ['争吵后，求同存异', 1],
                    60 => ['互相有商有量，求同存异', 1],
                    79 => ['遇到矛盾分歧愿意为对方让步', 2],
                    100 => ['关注对方的需求点，在矛盾发生前防患于未然', 3],
                ],
                [
                    10 => ['长期排斥与对方接触，性冷淡', 3],
                    30 => ['偶尔排斥与对方接触', 2],
                    49 => ['相处时不太自然，但不排斥与对方肢体接触', 1],
                    60 => ['彼此能够互相满足需求', 1],
                    79 => ['有爱有性，理想婚姻', 2],
                    100 => ['身体精神双重依赖，灵肉合一', 3],
                ],
            ],
            10 => [
                // 事业 互相成就、团队协作、利益拟合、目标一致、信任支持、沟通交流
                [
                    10 => ['对彼此的工作方式和理念产生质疑，合作容易受阻。', 3],
                    30 => ['在观点上容易产生严重分歧，互相不理解', 2],
                    49 => ['容易因争夺机会、资源，暗中较劲，影响彼此的合作和互助。', 1],
                    60 => ['始终以真诚的态度鼓励和支持对方，在困难时刻成为坚实的依靠。', 1],
                    79 => ['愿意分享宝贵经验和资源，助力对方提升能力', 2],
                    100 => ['能够充分发挥各自优势互补，实现一加一大于二的效果', 3],
                ],
                [
                    10 => ['沟通不顺畅，容易有误解', 3],
                    30 => ['双方观念差异大，目标难以统一', 2],
                    49 => ['工作时分歧较多，难以磨合', 1],
                    60 => ['能够及时、有效地沟通，迅速解决问题，推进工作进展。', 1],
                    79 => ['能够合理分工，默契较好，充分发挥每个人的才华。', 2],
                    100 => ['拥有明确且一致的目标，心往一处想，劲往一处使。', 3],
                ],
                [
                    10 => ['利益分配不均，易生怨怼', 3],
                    30 => ['付出与回报不合理，一方易生不满', 2],
                    49 => ['双方利益有冲突，容易引发不满', 1],
                    60 => ['善于合理分配利益成果，确保双方都能获得公平且满意的回报。', 1],
                    79 => ['优先考虑共同利益，做出适当的自我牺牲。', 2],
                    100 => ['为实现共同利益全力以赴，不计较个人得失。', 3],
                ],
                [
                    10 => ['有根本性分歧，目标冲突较大', 3],
                    30 => ['双方态度相反，都很固执己见', 2],
                    49 => ['双方分歧较大，目标难以达成一致', 1],
                    60 => ['遇到多变情况依然能够达成一致目标', 1],
                    79 => ['双方目标紧密结合，形成强大的合力。', 2],
                    100 => ['对于工作的目标有着清晰且高度一致的认知，能够共同为之努力。', 3],
                ],
                [
                    10 => ['怀疑心重，互相猜疑，信任容易受损', 3],
                    30 => ['承诺难以达成，信任感较低', 2],
                    49 => ['难以给予强力支撑，信任度有限', 1],
                    60 => ['能够分享重要的工作信息和资源，共同受益。', 1],
                    79 => ['完全放心交付，不进行过多的干涉和质疑。', 2],
                    100 => ['彼此坚信对方的能力和决策，给予坚定的支持和鼓励。', 3],
                ],
                [
                    10 => ['难以互相理解，矛盾误会不断', 3],
                    30 => ['沟通不太顺畅，各自都较为固执己见', 2],
                    49 => ['双方都不耐烦，沟通有障碍', 1],
                    60 => ['沟通交流较为顺畅，能够理解彼此的意思', 1],
                    79 => ['双方交流坦诚直接，清晰准确地表达自己的意见', 2],
                    100 => ['能够积极倾听对方的观点和想法，给予充分的尊重和关注。', 3],
                ],
            ],
            11 => [
                // 朋友 共同兴趣、信任支持、倾听沟通、共同进步、真实坦诚、密切程度
                [
                    10 => ['趣味不同，爱好南辕北辙。', 3],
                    30 => ['差异成就多彩，友情跨越界限。', 2],
                    49 => ['爱好不同，却不妨碍我们成为好友。', 1],
                    60 => ['共同的爱好连接着彼此的心，让友情更加深厚。', 1],
                    79 => ['兴趣相投，我们的相聚总是充满欢笑与共鸣。', 2],
                    100 => ['志同道合，在爱好中找到了无尽的乐趣与默契。', 3],
                ],
                [
                    10 => ['彼此不信任，难以真诚相待。', 3],
                    30 => ['相处方式小心翼翼，失去了往日的坦诚。', 2],
                    49 => ['信任似乎遇到了一些挑战，彼此感到有些不安。', 1],
                    60 => ['每一次相互扶持和信任，都让友情更加深厚和珍贵。', 1],
                    79 => ['无论风雨变换，我都深信你会是我最坚实的后盾。', 2],
                    100 => ['友情建立在彼此深深的信任之上，坚不可摧。', 3],
                ],
                [
                    10 => ['沟通障碍重重，友情面临考验。', 3],
                    30 => ['话题难寻共识少，沟通陷入僵局。', 2],
                    49 => ['言语表达词不达意，交流成难题。', 1],
                    60 => ['有耐心的倾听，毫无保留地表达自我。', 1],
                    79 => ['有效倾听与交流，激励彼此不断前行。', 2],
                    100 => ['总能让彼此的心灵，得到最深刻的触动与共鸣。', 3],
                ],
                [
                    10 => ['观念不合，让共同进步变得难以实现。', 3],
                    30 => ['缺乏相互激励，在成长路上渐行渐远。', 2],
                    49 => ['彼此目标相异，难以携手共赴成长之路。', 1],
                    60 => ['每一次的分享与交流，都是彼此成长的契机。', 1],
                    79 => ['相互学习，共同进步，展现了最真挚的情谊。', 2],
                    100 => ['携手并进，相互激励，共同迈向更高的目标。', 3],
                ],
                [
                    10 => ['关系如同薄冰，缺乏真实与坦诚的支撑。', 3],
                    30 => ['表面的和谐掩盖内心的隔阂，难以稳固。', 2],
                    49 => ['交往隔着一层纱，难以触及对方的真实想法。', 1],
                    60 => ['敢于直面不完美，坦诚的话语促进共同成长。', 1],
                    79 => ['用真诚的话语交流，用坦荡的心胸接纳彼此', 2],
                    100 => ['坦诚相待，无论风雨变换，都能坚守初心。', 3],
                ],
                [
                    10 => ['两条平行线，各自忙碌，鲜有交集。', 3],
                    30 => ['共同话题少，难以触及彼此的真实世界。', 2],
                    49 => ['缺乏深入交流，让彼此感受到距离感。', 1],
                    60 => ['友情愈发深厚，密不可分。', 1],
                    79 => ['彼此的心紧紧相依，共同经历风雨，共享阳光。', 2],
                    100 => ['生命中的知己，无话不谈，心灵相通。', 3],
                ],
            ],
        ];

        $scoreList = array_slice($score, 0, 6);

        $res = [[], []];
        if (isset($textList[$type]) && !empty($textList[$type]))
        {
            foreach ($scoreList as $k1 => $v1)
            {
                $multipleScore = $v1 * $this->multiple;
                foreach ($textList[$type][$k1] as $k2 => $v2)
                {
                    // 按分数从小到大，按个检测哪个词条合适，若合适则跳出当前循环
                    if ($multipleScore <= $k2)
                    {
                        // 50分以上为契合点  50分以下为矛盾点
                        if ($multipleScore >= 50)
                        {
                            $res[0][] = $v2;
                            break;
                        }
                        $res[1][] = $v2;
                        break;
                    }
                }
            }
        }
        if (in_array($type, [8,9,10,11],true))
        {
            /**
             * 补充说明：
             *  1、契合点和矛盾点，最多分别显示三条。契合点至少1条，矛盾点至少2条。
             *  2、当有多个分数达到80分以上时，按照优先级（如6543的顺序）选取三条契合点。当最高分数没有超过50分时，选择分数最高的保底词条。
             *  3、当有多个分数为50分以下时，按照相反的优先级（如1234的顺序）选择最差的三条矛盾点。当最低分数没有低于50分以下时，按照分数以低到高排序选择两条保底。）
             */
            // 契合点至少1条
            if (empty($res[0]))
            {
                $maxScore = max($scoreList);
                $maxKey = array_search($maxScore, $scoreList, true);
                $res[0][] = $textList[$type][$maxKey][60];
            }
            // 矛盾点至少2条
            $baseCount = count($res[1]);
            if ($baseCount <= 1)
            {
                // 正序排序，从小到大，取最低分
                asort($scoreList);
                $ks = [49, 30];
                foreach ($scoreList as $k3 => $v3)
                {
                    if (count($res[1]) >= 2) break;
                    $bk = array_shift($ks);
                    if($baseCount === 1 && $textList[$type][$k3][$bk][0] === $res[1][0][0])
                    {
                        $bk = array_shift($ks);
                    }
                    $res[1][] = $textList[$type][$k3][$bk];
                }
            }
            $res[0] = array_slice(resort($res[0], '1', 'DESC'), 0, 3);
            $res[1] = array_slice(resort($res[1], '1', 'DESC'), 0, 3);
            $res[0] = array_column($res[0], '0');
            $res[1] = array_column($res[1], '0');
        }

        return $res;
    }

    /**
     * 获取相处建议词条
     * @param $type
     * @param $score
     * @return string
     */
    protected function getSuggestText($type, $score): string
    {
        $textList = [
            7 => [],
            8 => [
                // 恋爱 尊重信任、支持理解、互相依赖、共同兴趣、沟通、亲密
                ['给彼此压力，成就共同成长', 3],
                ['想要Ta更理解你，你要先学会理解Ta。', 4],
                ['创造一些独处时间，制定未来的共同目标。', 5],
                ['培养一个你们共同的爱好，在快乐中共建幸福。', 1],
                ['你一言，我一语，用心聆听彼此的内心，你们的关系会进一大步。', 2],
                ['不要吝啬表达你的爱意，付出更多爱，你也会得到Ta的更多爱。', 6],
            ],
            9 => [
                // 婚姻 尊重信任、支持理解、事业财富、共同目标、妥协忍让、性和谐
                ['亲密的本质，是无间信任', 3],
                ['有理解，才有惺惺相惜', 4],
                ['抱得起“砖”，同样也抱得起你', 5],
                ['互相成就，相互扶持', 2],
                ['爱到妥协，换来的是情比金坚', 1],
                ['激情，是爱的另一种重要表达方式', 6],
            ],
            10 => [
                // 事业 互相成就、团队协作、利益拟合、目标一致、信任支持、沟通交流
                ['相互助力、成就彼此', 3],
                ['协作紧密无间，积极配合', 4],
                ['为整体利益努力，为共同目标奋斗', 5],
                ['目标一致、奋力前行', 1],
                ['相互信任支持，携手攻克难关', 2],
                ['沟通交流顺畅高效、默契十足', 6],
            ],
            11 => [
                // 朋友 共同兴趣、信任支持、倾听沟通、共同进步、真实坦诚、密切程度
                ['互相探索与发现，培养共同兴趣爱好。', 3],
                ['坦诚相待，做对方坚实的后盾。', 4],
                ['在倾听时，保持一颗开放、无偏见的心。', 5],
                ['设立目标，携手共同进步。', 1],
                ['尊重彼此的差异，鼓励对方表达真实想法。', 2],
                ['分享生活点滴，相互支持，共同成长！', 6],
            ],
        ];
        $res = [];
        if (isset($textList[$type]) && !empty($textList[$type]))
        {
            for ($i = 0; $i < 6; $i++)
            {
                $newText = $textList[$type][$i];
                if (empty($res) || $score[$i] > $res['score'] || ($score[$i] === $res['score'] && $newText[1] > $res['sort']))
                {
                    $res = [
                        'text' => $newText[0],
                        'score' => $score[$i],
                        'sort' => $newText[1]
                    ];
                }
            }
        }
        return $res['text'] ?? '';
    }
}
